Monday, 22 February 2016

Coarse Grained CPU-Profiling for Applications using Process Explorer

Today I wanted to quickly graph an applications CPU performance and compare how different start-up flags affected the CPU performance of the application. I didn't want to open perfmon.exe and go through the rigmarole of selecting the correct perf counters yadda-yadda.. I just wanted something quick and dirty..

As we all know, Process Explorer is the swiss-army knife for all things process based. If you need to do any diagnostics on a process then chances are Process Explorer will be able to help in some way.

Enter Process Explorer with its "Performance Graph" tab and this quick little tip!

With Process Explorer running, go to the process in question and select the "Performance Graph" tab. You will see something like this:

This tab displays the "CPU usage" for the process, the "memory usage" and the "disk I/O". All useful information. As an aside, watching to see if the memory usage increases is a basic way to see if your app has a memory leak.

I was interested in the CPU usage for this process which is the top graph. With the mouse you can hover over the graph to get a time and a CPU usage number but the 3 guidelines show you the 25%, 50% and 75% marks for rough approximation.

As you can see in the image above, the application is behaving quite nicely. For the majority of time it is idling under the 25% mark. Now, let’s alter some of the start-up flags, restart the application and compare the results from the graph below with the graph above.

You can clearly see that these settings increase the CPU usage for this process as the CPU now consistently hovers around 25% mark for the duration of the run.

One thing to be weary of is that these graphs don’t update if Process Explorer is minimized to the tray..

But hey... Like I said, its quick and dirty but that’s good enough for me today!


Contact Me:  ocean.airdrop@gmail.com

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages