Implementing Perf Counters
I have an application in C#, i want to implement perfcounters in this application so that i can track down the performance parameters and use them to make my application have better performance as of now th开发者_JAVA百科e application has performance issues.
ThanksPerformance counters only tell you that your program is slow. They don't tell you why your program is slow. Use a profiler.
this is great tutorial: http://www.codeproject.com/KB/dotnet/perfcounter.aspx
Check out the StopWatch class. Samples here.
To paraphrase @Hans, there's a world of difference between measuring performance problems and finding them, in spite of what is popularly said. Here's discussion of all that, and directions telling how to do it.
精彩评论