I’m looking for a simple, reusable way to record the time taken to execute a method in my .NET (MVC) project and record it it using NLog and wondered if anybody had any suggestions on how to implement this?
To maintain clean code and readability, I don’t really want to have to integrate it into my code if possible.
If anybody has any suggestions, I’d love to hear them.
You might want to have a look at this:
http://code.google.com/p/mvc-mini-profiler/
Written by the good people at stack exchange.