Dear Gurus,
All of you agree with the value of using Performance Counters for server applications.
I would like to know how to implement these using C#.
Usually performance counters have the following attributes:
- They are shared/global
- Writing requires locks to ensure synchronization
- Reading sometimes requires locks too
Is it better to update them asynchronously? What is the best way to make them asynchronous?
I am planning to use the ThreadPool.QueueUserWorkItem() function. What is your opinion about this?
If my questions seem a bit vague, please look at the HelloWorld WCF service.
I also want to know the following:
- How many times it's being hit overall and within a certain period
- Average/min/max response times overall and within a certain period
If any one knows of any specialized ways to do this in .NET or WCF, please let me know.