Skip to content

feross/cpus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpus travis npm downloads javascript style guide

os.cpus() for node and the browser

saucelabs

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.

About

os.cpus() for node and the browser

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published