MiniProfiler not logging all steps - only with active breakpoints

204 Views Asked by At

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:

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.

Log with inactive breakpoints

However, when I activate the breakpoints, the log is complete. Remember, that the breakpoints still do not interrupt the execution.

Log with active breakpoints

Is this a bug in the MiniProfiler?

1

There are 1 best solutions below

0
On

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...