Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Simple CPU usage metering for node
Wraps process.cpuUsage() in a simple to use interface. No need to multiply and divide to get CPU usage percentage.
Note: requires Node.js 6.1 or later.
npm install --save cpu-gauge
const gauge = require('cpu-gauge');
var cpu = gauge.start();
// ...
console.log(cpu.usage().percent);
Note altough node executes JavaScript in a single thread, it uses additional threads for background tasks. So it is possible that CPU goes well above 100%.
Starts metering the CPU usage. Returns a cpu object.
Resturns CPU usage of current process since start() invocation. Returned object has the following properties:
user
- user CPU time in microsecondssystem
- system CPU time in microsecondstime
- elapsed time in microsecondspercent
- CPU usage as percent of a logical core, so it could be above 100FAQs
Simple CPU usage metering for node
The npm package cpu-gauge receives a total of 1,594 weekly downloads. As such, cpu-gauge popularity was classified as popular.
We found that cpu-gauge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.