How to set the maximum number of calls in performance counters

Topics: General discussion, Policy Injection Application Block
Sep 1, 2010 at 4:12 AM

Hi I'm using Entlib 4.1 - attribute based performance counters as described in

I want to measure the average number of calls within 300ms. (i,e averageNumberOfCalls/300ms - I'm having trouble with the followings


[PeformanceCounterCallHandler("DemoCounter", "AverageCalls/300ms", IncrementAverageCallDuration = true..........???)]

void MyMethod() {}

a. How can I specify the number of milliseconds (i.e 300ms) in the performance counter handler. There is no property for that.

b. How can I specify the maximum number calls to include in the performance calculations. For example I want to include 10000 calls to calculate the averageNumberOfCall/300ms ?

Any ideas greatly appreciated.


Sep 1, 2010 at 7:10 AM

I think you need to create your own performance counter in order to meet your requirement.  Another possibility is to use a different tool that will allow you to monitor your counters based on a specified duration.  I don't know of any but I think there are such tools.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Sep 2, 2010 at 12:32 AM

Thanks a lot. Will look into this further.