-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
In the following line:
runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
Line 78 in 235915e
| _cpuTimeCounter ??= new PollingCounter("cpu-usage", this, () => RuntimeEventSourceHelper.GetCpuUsage()) { DisplayName = "CPU Usage", DisplayUnits = "%" }; |
The RuntimeEventSourceHelper.GetCpuUsage() returns an integer percent of all system resources used.
This means that on a machine with 128 cores, the smallest detectable change in CPU usage will be 128% of a single core, so a single threaded busy-loop application will report to be using 0% CPU according to this counter, when it's actually burning an entire core. This is very misleading.
D3-LucaPiombino