开发者

Measure CPU / RAM usage of a program

could anyone suggest a way (other than using Task Manager) to track and log a program's usage o开发者_如何学JAVAf CPU and RAM in order to profile its performance?

I'm working under Windows.

Something generic would be useful. A more specific request solution would involve Visual Studio. I've tried Performance Wizard, but it doesn't seem to give me the information I need. Thanks


Process Explorer can be useful.


You can use perfmon utility to gather various counters


Well, there are published APIs for that sort of thing. You might want to take a look at WMI and the Win32_Process class.

If you're looking for a command-line program that gets those things for you there is tasklist and wmic. You can parse their output if you're so inclined.


The Microsoft Platform SDK includes the Windows Performance Toolkit, which tracks CPU, disk, and memory usage over time (along with a ton of other features). It's very handy for tracking down spikes of CPU/memory usage, as well as tracking down issues like why your laptop won't sleep.


How about Intel VTune?


I view the measuring of performance, and the finding of performance problems so as to make the program faster, as two distinctly different goals.

For measuring, one can use profilers, or simply timers, to get the job done.

For finding performance problems, I take an entirely different approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜