When using the MiniProfiler to hunt down a performance issue, I encountered a situation, where the MiniProfiler would log only a few of the calls to MiniProfiler.Step(). This is the code:
The breakpoints are set to only count the number of hits (313 per run), they are not interrupting the execution. Notice, that they are deactivated in the screenshot above. After running the application, I get a very incomplete log from MiniProfiler, which, from run to run, has a differing number of entries, usually 2 to 5.
However, when I activate the breakpoints, the log is complete. Remember, that the breakpoints still do not interrupt the execution.
Is this a bug in the MiniProfiler?
Click
show trivial
- I suspect the ones you're not seeing are "trivial". When you hit the breakpoints, you make them appear not-so-trivial by increasing their execution time.EDIT:
... as I was poking around their code I stumbled on this public bool IsTrivial...