IT:AD:Performance Counters:HowTo:Develop a portable replacement system
Summary
Due to the difficulty of installing them (requires FullAdmin rights) and the fact that they're not available on Phone, etc., I've been looking for a while on how to design a replacement system.
Notes
- Performance Counters are only available on Desktop (not Phone).
- There are 4 different types of counters 1)- Point in Time
- Delta
- Ratio
- Delta Ratio
 
- It's not possible to add a new custom performance counter to an existing performance counter category.- Nor is it possible, as you will see below, to delete individual counters from a category. You can only create and delete entire categories.
 * When registering Counters, if using a Denominator Base, it always immediately follows the Numerator. 
Notes
- Using a DB datastore has some advantages (easily queried)
- Using EF is problematic (as you can't lock the table to read the value, to add an increment, and then persist the value all in one transaction).
- Using Stored Procs is not worth it (not available on SqlServer CE, so if it's not available on CE, it's like designing on a WebServer, where I could just use the Windows API anyway)- Note that Phone does have some Counters – but not Custom Counters…
 
- Using a constantly open stream with Counters at specific offsets is possible…- Doable – but if the file is left hanging, that's an issue…