Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 658 Bytes

File metadata and controls

18 lines (13 loc) · 658 Bytes

CPU Load

License Dependency Status NPM version

No dependencies.

let cpu = require('cpu-load')

// track the CPU load over the next 1 second
cpu(1000, function (load) {
  load //=> 0.03 (3%)
})

The CPU load is averaged across multi-core machines. No need to divide the cpu-load results against the number of cores.