Using performance counters with attributes

I am looking for a way to make it easier to create and use performance counters in our applications to run load tests and get information about a specific application using the counters. It would be nice to do this using attributes. For example, when a programmer places a corresponding attribute on a method, the execution time of the method is measured. So I am looking for an attribute that I can inherit that FW activates before and after the method call. Is there such an attribute?

Thanks a lot, Dani

Edit: After some research, I found PerformanceCounterCallHandlerAttribute

from EntLib. It seems to me that this is what I need, but I would like to know exactly how it works. I couldn't get away with this document that I found. Any help would be appreciated.

+3


source to share


1 answer


Check this one . Not exactly what you are asking for, but I believe the same approach will work for you. This is all about handling events before, after, and after errors.



0


source







All Articles