About two years ago now I wrote part 1 and part 2of a MSDN article entitled 'Measure Early and Measure Often for Good Performance'. In this article I mention some 'perf mantra' which is that
Well, that second point (measuring), has never been as easy as you would like it to be. However we do keep trying.
As part of this effort the CLR team has posted a useful tool, perfMonitor, on its codeplex site http://bcl.codeplex.com/.
PerfMonitor is a application that can both collect performance data and create performance reports on managed (and unmanaged), applications. It was designed to streamline the common case. Lets assume you have an application called 'MyApp' and you wish to measure its end-to-end performance. It is as simple as running the command
If the app is interactive, you can interact with it and force it down the code paths you are interested in. When the application completes, PerfMonitor will create a report. Information in the report includes
PerfMonitor tries to be helpful along the way, highlighting unusual performance data, and trying to put the data that it does in perspective. The goal is that simple performance problems can be isolated in minutes, and harder problems are possible. Because it is so easy to deploy and run PerfMonitor and look at the first level analysis, you really have to ask yourself 'why not'?
Another useful aspect of PerfMonitor is that it is REALLY easy to deploy. It is a single EXE that requires no installation (just copy it to your machine and you can run it (It does require Vista OS or better). To get it
You can also simply double click on the perfMonitor.exe from either the ZIP file directly or wherever you copied perfMonitor to. This will bring up the users guide, which will explain the features in detail.
This is only the begining...
Over the next several weeks I will be posting more about perfMonitor and how to use it to help build high performance applications. It is really just a (simple) front end on powerful performance monitoring technology built into windows called Event Tracing for Windows (ETW). This is the same technology that the Windows team uses almost exclusively for its performance work, and is the basis for their VERY useful XPERF tool. Because of this, PerfMonitor and XPERF can interoperate on the SAME wealth of performance data that the operating system can collect for you.
There really are very few performance problems that the OS does not ALREADY capture the information needed to do an efficient analysis. The key is having tools t display it and some basic knowledge that will guide you through the data. This will be the subject of future posts....