The managed API for the windows performance counters is great. It was just what I needed to track down some memory issues at work, and now I've got real-time information about what's going on. It's much simpler than trying to use them with the old school api. However, I need some more guidance on the usage pattern for creating and deleting the categories and counter definitions. Are those things that should be part of an install/uninstall procedure, or should they be done on startup/exit of the program? What kind of overhead should I expect in constructing/incrementing/disposing them? The counters implement IDisposable, which makes me want to dispose them quickly.
Maybe some spelunking with the Reflector will shed some light. I'll keep you posted. In the meantime, feel free to share your experiences with performance counters in the CLR.
[Update] Duh. I ran across System.Diagnostics.PerformanceCounterInstaller the other day. Looks like that's how you should install them. I love the installers as well.
Remember Me
Page rendered at Sunday, October 12, 2008 8:56:36 AM (Pacific Standard Time, UTC-08:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.