-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.linuxIssues and PRs related to the Linux platform.Issues and PRs related to the Linux platform.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.
Description
- Version: v13.11.0
- Platform: Linux 4.15.0-91-generic new design of error handling #92-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: os
What steps will reproduce the bug?
const { cpus } = require('os');
const measure = () => cpus().map(c => c.times.idle);
const diff = (first, second) => second.map((v, i) => v - first[i]);
setTimeout(((first) => () => console.log(diff(first, measure())))(measure()), 1000);How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
Within 1000ms, each core cannot spend more than (approximately) 1000ms idle.
What do you see instead?
[
10200, 10200,
10100, 10200,
10000, 10000,
9900, 10000
]Additional information
I cannot reproduce the problem on Windows, so I assumed it's a problem in libuv, but the code in libuv seems correct to me.
Metadata
Metadata
Assignees
Labels
libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.linuxIssues and PRs related to the Linux platform.Issues and PRs related to the Linux platform.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.