Closed
Description
The docs for os.cpus()
state:
The
os.cpus()
method returns an array of objects containing information about each CPU/core installed.
It would be more accurate to use the word "threads" rather than "CPU/core". Not sure if this behaviour is intentional or due to how the OS reports cores. Either way, a note in the docs would be helpful to clarify this. Do you want a PR?
Example:
$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
$ sysctl -n machdep.cpu.core_count
2
$ sysctl -n machdep.cpu.thread_count
4
$ node -e "console.log(require('os').cpus().length)"
4