Last post Jan 20, 2010 07:47 PM by dotNet_Student
Jan 19, 2010 02:58 PM|dotNet_Student|LINK
Just wanted to get some feed back to see if this has already been addressed before.
I am working on an app which does "a lot" of data processing. I need to gather some statistics on how much data has been processed. My main objective is to make the statistic gathering logic as unintrusive as possible. For example:
foreach(var items in myDataCollection)
Process more stuff();
//Gather Other type of Statistics
I am not sure if injecting my "Statistic Gathering Logic" within the processing logic a good thing or not. I guess my question is should I just inject the "Statistic Gathering Logic" within the process i.e. make another call to method which basically just
stores the information in a table, or should I raise an event or perhaps something else?
Are there any Patterns out there which address this already so I don't have to reinvent the wheel?
Jan 20, 2010 02:02 PM|atconway|LINK
Yes using performance counters built into .NET for gathering statistics can be a powerful resource. As far as overall design and usage, you should investigate the link and associated code examples within the links below to see the proper way of using them:
Performance Counters for ASP.NET:
Using System Monitoring Components:
System Monitoring Components How-to Topics (Great links here):
Hope this helps!
Jan 20, 2010 07:47 PM|dotNet_Student|LINK
Thank you. I will check it out.