This project has moved and is read-only. For the latest updates, please go here.
When implementing any server-side process, it can be extremely helpful to have a real-time view of hard metrics that describe the current state of that process. These metrics are used during performance stress tests as well as for production operational monitoring. Doing trend analysis on these metrics can add even more value.

Within Windows, “performance counters” are (often) the mechanism used to make this happen. The “perfmon” utility (hosted these days within an MMC console) provides an easy mechanism to visually consume performance counter data (either locally or remote), along with the built in “Performance Logs and Alerts” service. Enterprise monitoring tools such as Microsoft Operations Manager (MOM) can provide more sophisticated ways to use this data, as can load testing tools such as LodeRunner. Performance counters are an integral part of any server measurement and monitoring strategy.

Updating performance counters at run time is an extremely light-weight operation, as under-the-hood it is simply an update to a structure in shared-memory. However, implementing performance counters with what is offered in the Win32 SDK is a somewhat daunting effort, which is why you didn’t see the average “IT shop” application tackling the task until recently. .NET brought the PerformanceCounter and PerformanceCounterCategory classes – which made implementation of custom counters much, much easier.

However, the .NET abstractions around performance counters still leave a fair amount of work to do. You have to define what you want to measure, and manage a PerformanceCounter instance for each measurement. That PerformanceCounter instance has to be interacted with at the appropriate time in your code, and an installation strategy has to be included with your deployment (since the set of all performance counters available on a system is defined in the registry - and for .NET, modified via the PerformanceCounterInstaller class.)

Moreover, when you look at the set of performance counters exposed by applications such as ASP, ASP.NET, SQL Server, BizTalk etc. you find a common pattern. For a given type of “request” flowing into the system, you often find counters for metrics like:
  • Requests Executing
  • Total Requests
  • Failed Requests
  • Request Execution Time
  • Requests/second
All of these numbers can be interesting at various points in a performance testing or operational monitoring scenario – but each of them requires coding to implement. Again, the idea with QuickCounters is to raise the level of abstraction from that of an individual performance counter up to the request itself, using a simple API.


Getting Started

Last edited Dec 14, 2006 at 1:55 PM by scolestock, version 4