Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ultra-runner

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ultra-runner - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [2.3.0](https://github.com/folke/ultra-runner/compare/v2.2.1...v2.3.0) (2020-03-15)
### Features
* ✨ sort by total cpu for parent process including its children ([755dc60](https://github.com/folke/ultra-runner/commit/755dc6030f43094f6f00f72f8652aeb654fda637))
### [2.2.1](https://github.com/folke/ultra-runner/compare/v2.2.0...v2.2.1) (2020-03-15)

@@ -7,0 +14,0 @@

8

lib/process-list.js

@@ -65,2 +65,6 @@ "use strict";

}
function getTotalCpu(proc) {
return ((proc.cpu || 0) +
proc.children.reduce((p, c) => (getTotalCpu(c) || 0) + p, 0));
}
function getProcessTree() {

@@ -80,3 +84,3 @@ return tslib_1.__awaiter(this, void 0, void 0, function* () {

.filter(proc => !children.has(proc.pid))
.sort((a, b) => (b.cpu || 0) - (a.cpu || 0));
.sort((a, b) => getTotalCpu(b) - getTotalCpu(a));
});

@@ -120,3 +124,3 @@ }

`${chalk_1.default.magenta(proc.pid)}`,
(((_a = proc.cpu) !== null && _a !== void 0 ? _a : 0) > 10 ? chalk_1.default.red : chalk_1.default.green)(`${proc.cpu}%`),
(((_a = proc.cpu) !== null && _a !== void 0 ? _a : 0) > 10 ? chalk_1.default.red : chalk_1.default.green)(`${proc.cpu}%`.padEnd(5)),
(((_b = proc.memory) !== null && _b !== void 0 ? _b : 0) > 10 ? chalk_1.default.red : chalk_1.default.green)(`${proc.memory}%`),

@@ -123,0 +127,0 @@ chalk_1.default.blue(proc.project ? proc.project : ""),

{
"name": "ultra-runner",
"description": "Smart and beautiful script runner that hijacks any `npm run`, `yarn` and `npx` calls for ultra fast execution",
"version": "2.2.1",
"version": "2.3.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "repository": "http://github.com/folke/ultra-runner",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc