0

I've been reading on Performance Counters and I was wondering if it is a good practice to leave them in the released application?

I have never encountered an application that has it's own custom performance counters but I think it would be useful for the user to be able to track certain aspects of the process' performance in PerfMon.

What is the downside to using custom performance counters in the release version of your application and/or what is the downgrade in performance associated with having performance counters in you application?

6
  • There are downsides to everything. Every line of code is debt. Question is whether you can take this debt, because pros outweigh cons, but this is different for every applications, so the only person who can answer this question is you. Commented Jun 27, 2018 at 8:41
  • @FCin I was more asking what is the "debt" associated with performance counters. I thought it was obvious, but I will make it even more so. Commented Jun 27, 2018 at 8:43
  • Are these custom performance counters using the built-in facility or you rolled your own measurement of internal parameters of your app? Commented Jun 27, 2018 at 8:46
  • @PepitoSh the built-in kind. I'd expect to know the impact of my own measuring tools, if I make any. :) Commented Jun 27, 2018 at 8:55
  • Well, you certainly have encountered custom perf counters, any C# program has them. Easy to think of them as "standard", but as far as the OS is concerned they certainly are not. Some of them even have to be enabled explicitly. They did not make them expensive to update but you can always fumble it. They are for the benefit of a human, that makes updating them more frequently than 25 times per second a wasted effort. Glacial to a modern machine, that can only make gathering the data you need to update the counter a potential problem. Commented Jun 27, 2018 at 9:14

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.