How does one calculate CPU utilization programmatically ?

Posted by Scott Davies on Stack Overflow See other posts from Stack Overflow or by Scott Davies
Published on 2010-04-09T15:34:59Z Indexed on 2010/04/09 15:43 UTC
Read the original article Hit count: 421

Filed under:
|
|

Hi,

I have a benchmarking program that calculates the time (in milliseconds and ticks), for a persistance to Entity Framework 4.0. Is there a way to calculate CPU load ? I am guessing that I would need to query Windows to find out my CPU frequency, how many cores, etc. Does this sound right ? If so, what part of the .NET framework relates to querying the system ? I am guessing System.Diagnostics ?

Thanks,

Scott

© Stack Overflow or respective owner

Related posts about benchmarking

Related posts about c#