我想不时使用 MiniProfiler 来分析我的代码,但我不想分支并继续重新引入它;我想把它留在那里,@MiniProfiler.RenderIncludes()当我不使用它时,只需从我的布局模板中删除调用。但是,我的代码仍然看起来像这样:
using (MiniProfiler.Current.Step("Generate events index view model")) {
    _thisStep = MiniProfiler.Current.Step("Check query string");
    int pageIndex = 0;
    // Do check...
    _thisStep.Dispose();
    // Do other stuff...
}
Step将那些s 留在那里并处理它们会导致多少开销?有没有办法告诉 MiniProfiler 我没有使用它,所以Step基本上什么都不做,但我仍然可以将它留在我的代码中?