I am looking for some kind of library that periodically gives me the exact values โโof the processor frequency on Intel and AMD processors, on 32-bit and 64-bit Windows.
The purpose of this is to accurately measure the CPU utilization on this computer. The problem is that calling QueryPerformanceCounter()
returns clock ticks (used to measure activity duration), but the base frequency of the processor is not constant due to SpeedStep or TurboBoost. I found several computers where shutting down SpeedStep / TurboBoost in the BIOS does not prevent scaling of the processor frequency depending on the load.
I'm trying to find out if there are any libraries that can be used to detect changes in the processor frequency (same as Throttlestop
/ CPU-Z
or even the Resource Monitor
Overview tab in Windows 7), so that I could query and save this information along with my other measurements. Performance counters do not seem to return reliable information, since I have computers that always return 100% of the processor frequency, even if other tools show dynamic changes in frequency.
I searched for such libraries, but most of the results come back with gadgets, etc., which are not useful.
source share