This is the scenario I am facing: I am using MiniProfiler to profile some operations. But it lacks a particular functionality that I will have to use. There is a Settings file MiniProfiler that can let me do some configurations like what to consider for profiling and what not, what to think as slow and what not, etc. But these are global settings and apply to all operations being profiled. What I need is to be able to say something like this:
using (mvcminiprofiler.Step("OperationName", 1200)
{
//some C# code
}
This argument '1200' signifies that this operation is expected to take 1200 ms and do not save it's results to the database if it takes anything less than or equal to 1200 ms. But if it takes more than 1200 ms then save this response time to the data base. So I am basically talking about per operation threshold values.
I am willing to write a wrapper around the MiniProfiler for this but I am not willing to change the mini profiler source code. Actually we have already built a little framework around the mini profiler but we would not like to change its source code. But merely extend it's functionality in some ways.