cpu-gauge1.1.0 • Public • Published
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 = ;var cpu = gaugestart;// ...console;
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 microseconds
system- system CPU time in microseconds
time- elapsed time in microseconds
percent- CPU usage as percent of a logical core, so it could be above 100