Object and Counter Design (Windows CE 5.0)

Windows CE 5.0
Send Feedback

With careful design, you can improve the efficiency of performance data collection by understanding more about performance objects and using their characteristics to your advantage.

A performance object contains performance data. A performance counter defines the type of data available to a counter object. An application can provide information to multiple performance objects, each with one or more counters.

An application can 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.

The performance DLL for the application reports performance data for each drive controlled by the application.

You can collect data through means as simple as incrementing a counter each time a specific routine in the application is called. You can also use time-consuming calculations.

A counter or timer should increment and never be cleared.

A counter can wrap, as long as it does not wrap twice between snapshots.

Your application can collect and store data during its normal execution, as long as it does not affect the performance of the application.

For some types of data, it might be more efficient or appropriate to collect data on demand. In such a situation, the performance DLL communicates to the application, requesting the data.

For data that takes a significant amount of time or system resources to collect, consider collecting data only when the performance-monitoring program requests the data. This approach allows a custom performance-monitoring program to routinely request data for all counters that do not require significant time or resources to collect.


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: