PC Review


Reply
Thread Tools Rate Thread

How To: Custom Performance Counters with intervals other than 1 second?

 
 
Mountain
Guest
Posts: n/a
 
      11th Aug 2005
I want to implement a custom performance counter for monitoring errors
in my application. However, the correct rate is not exceptions per
second!

(If my app is throwing multiple exceptions per second, then the last
thing I need to be doing is writing custom performance counters!)

I want to implement a counter that has a period of 1 hour. What is the
right way (or best way) to do this? I figure out one way, but I had to
implement all the code and not use any of the methods in the
Diagnostics namespace (other than just setting the raw value of my
counter).

I don't think that is the right way to do it. Although all the
framework code seems to assume periodicity of 1 sec, I have a feeling I
should be able to use the framework methods and obtain rates per hour
-- I just need some help figuring out the way to go about it.

Thanks

 
Reply With Quote
 
 
 
 
Derrick Coetzee [MSFT]
Guest
Posts: n/a
 
      12th Aug 2005
Mountain wrote:
> I want to implement a counter that has a period of 1 hour. What is the
> right way (or best way) to do this? I figure out one way, but I had to
> implement all the code and not use any of the methods in the
> Diagnostics namespace (other than just setting the raw value of my
> counter).


Hi, Mountain. Our team has dealt with this problem also, and in the end we
decided to primarily use "total" counters, which simply count all
occurrences of the event since the application began (or even ever). Once
you have this, you can easily construct a tool that takes regular samples
and takes differences to construct a plot at any rate you desire.
Unfortunately Performance Monitor does not have this useful capability
built-in, but once you create such a tool you can use it in diverse
circumstances. I hope this helps.
--
Derrick Coetzee, MCP, MSFT (Speech Server)
This posting is provided "AS IS" with no warranties, and confers no
rights.


 
Reply With Quote
 
Mountain
Guest
Posts: n/a
 
      13th Aug 2005
Hi Derrick,
Thank you for your reply. It seems there are only 2 options: do it like
you did, or write a performance extension DLL. I'm not sure writing a
performance extension DLL is worth the effort given that the approach
you describe should work just as well.
Regards,
Mountain

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Get Some Standard and Custom Performance Counters? Jie Wang [MSFT] Microsoft Dot NET Framework 0 8th May 2009 11:11 AM
RE: Get Some Standard and Custom Performance Counters? Jie Wang [MSFT] Microsoft Dot NET Framework 0 4th May 2009 02:37 PM
Custom Performance counters- (RateOfCountsPerSecond32) Ken Microsoft Dot NET Framework 0 11th Sep 2008 02:54 PM
Custom counters missing in Performance Monitor log md Windows XP General 1 27th Feb 2008 09:51 PM
How To: Custom Performance Counters with intervals other than 1 second? Mountain Microsoft C# .NET 2 13th Aug 2005 03:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:35 AM.