cpus
v1.0.0 browser browserify concurrency cpu info cpus hardware concurrency hardwareConcurrency navigator.hardwareConcurrency num cpus and 1 more...
cpus
os.cpus()
for node and the browser
Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
See the node.js documentation for
os.cpus()
.
In the browser, the navigator.hardwareConcurrency
API is used, when available.
install
npm install cpus
usage
var cpus = require('cpus')
console.log(cpus().length) // 4
license
MIT. Copyright (C) Feross Aboukhadijeh.
npm i [email protected]
Metadata
- MIT
- Whatever
- Feross Aboukhadijeh
- released 1/11/2016