Object and Counter Design

A performance counter object is an entity for which performance data is available. A performance counter defines the type of data that is available for a particular type of counter object. An application can provide information for multiple counter objects, each with more than one counter.

Using the Windows NT system to illustrate the relationship between objects and counters, objects include memory, disk, and cache. Each of these objects has multiple counters relating to that object: the Memory object includes the counters Available Bytes and Page Faults/sec, for example.

An application can also define objects that have multiple instances. For example, a SCSI application could use a single set of counter definitions to define a drive object with two counters, such as Bytes Read and Bytes Written. Using this object, the application's performance DLL could report performance data for multiple instances of the drive object (for example, for each drive controlled by the application).

Performance Monitor always shows counters denoting raw counts as rates, such as Page Faults/sec. This gives context to the viewer, who doesn't have to do in-the-head calculations to compare data from different time intervals. However, you don't have to worry about this when you design a counter. Just let the counter count incrementally, and let the monitor application do the work of converting raw counts to a rate.