-
-
Notifications
You must be signed in to change notification settings - Fork 70
Description
In the report generated by process.report, we have resourceUsage.cpuConsumptionPercent.
As per the original PR, this is the percentage of CPU in use across all cpu cores. The issue I'm raising here didn't seem to be considered--rather the maintainer decided that granular information about each core was not useful (and they are right).
Now, it's been awhile since my computer architecture classes, but what I think this means is that you cannot just look at the number reported and know what it means. A usage of 100% on system A may be a problem, but a usage of 120% on system B might not be.
(We are not guaranteed to be consuming the report on the machine it was generated on, either.)
So, I propose adding header.osCpus, which would be a number corresponding to the output of os.cpus().length. A consumer can then use both of these to determine the theoretical ceiling of the CPU consumption percentage value (multiply header.osCpus by 100).
If it's a good idea, I could implement. If I can do it in lib/internal/process/report.js that'd be even better. 😝