Solved

Creating Stats on Method Hits

Posted on 2007-11-16
2
233 Views
Last Modified: 2010-04-15
Bit of a strange one, but I am looking to have a method:

GetStatus()

That would simply return statistical information on how many times certain processes are done. I was thinking the best way to do this would be to use a KVP system and every time a method is called simply increment it by one.

So I would have:

GetMatrix()

This would go to the KVP look for the Matrix entry and update it's pairby one. Just making sure there really isnt an easier way before I put this all throughout my code.

Cheers
0
Comment
Question by:directxBOB
2 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 500 total points
ID: 20299041
We use a product called NLog. It's free and very capable.
In addition to counts, it can log errors debug info etc. It is configured with XML so you can turn it on and off at any given installation as needed.

http://www.nlog-project.org/

Jim
0
 

Author Comment

by:directxBOB
ID: 20311214
Cheers Jim, I am already using NLog for tracing, errors and debuging.

That said the purpose of this method is to actually determine the status of the application. So for example it will have the last error, what parts of the application is offline etc.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question