Google Answers Logo
View Question
 
Q: Easy question on Performance Monitor counters in C# ( No Answer,   0 Comments )
Question  
Subject: Easy question on Performance Monitor counters in C#
Category: Computers > Programming
Asked by: mountaintop-ga
List Price: $15.00
Posted: 11 Aug 2005 09:06 PDT
Expires: 24 Aug 2005 10:06 PDT
Question ID: 554480
I want to implement a custom Performance Monitor counter that has a period of
1 hour (or any other period other than 1 second). What is the best way
to do this in C# using the built-in functionality in the
System.Diagnotics namespace? I don't want to have to use a Timer in my
own code -- this is what I'm doing now. I want to do it the "right"
way. I know how to create, read and update custom Performance Monitor
counters. What I am asking for help with is how to implement a
rate-based counter (exceptions thrown per hour, for example) where the
interval is NOT 1 second.
Thanks

Clarification of Question by mountaintop-ga on 12 Aug 2005 15:29 PDT
I am thinking that the solution might be to define a custom
performance monitor TYPE -- something like a derivation of
CountPerTimeInterval32 with a different time interval.

From the MSDN help, here is the formula:

Formula: (N1 - N 0)/ (D 1 - D 0), where the numerator represents the
number of items in a queue and the denominator represents the time
elapsed during the sample interval.

If there were a different PC TYPE defined, where the formula converted
the units of time into 1 hour (or 15 minute, etc.) periods, that might
be my solution... anyone want to provide me an answer?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy