I’ve been playing around with ProfileLevel passed into the MiniProfiler.Start()
. I’ve tried both ProfileLevel.Info
and ProfileLevel.Verbose
, but I don’t see any difference in the results on the screen. Is there any documentation on what this ProfileLevel does?
It is a bit hacky, it allows you to specify that certain steps get suppressed from the UI.
The implementation is:
internal IDisposable StepImpl(string name, ProfileLevel level = ProfileLevel.Info)
{
if (level > this.Level) return null;
return new Timing(this, Head, name);
}
So, by default stuff is considered ProfileLevel.Info
if you decide you want to have stuff that only shows up in debug you can use the Step
overload to specify that. Then in MiniProfiler.Start
pass in a lower ProfileLevel for, say, debug.
Personally, I don’t use this feature, I would not mind stripping it out.