Using performance counters does have some overhead (e.g. on Windows takes ~2 seconds to initialise and uses extra ~2.5 MB of memory), which is probably overkill for just one informational line in one command
There are also some issues with using them to measure 'all processes CPU usage'
Unsupported in .NET Core on Linux
Doesn't work properly on macOS and always shows 100% (although I was testing using mkbundle cross compiled build)
Potentially might not work properly in wine (although I haven't been able to test that yet)
So should instead switch to using OS specific 'get all CPU time' functions, such as e.g. GetSystemTimes on Windows
Using performance counters does have some overhead (e.g. on Windows takes ~2 seconds to initialise and uses extra ~2.5 MB of memory), which is probably overkill for just one informational line in one command
There are also some issues with using them to measure 'all processes CPU usage'
100%
(although I was testing using mkbundle cross compiled build)So should instead switch to using OS specific 'get all CPU time' functions, such as e.g.
GetSystemTimes
on Windows