MiniProfiler

用于检测性能的工具

 

1. Nuget 下载

MiniProfiler

MiniProfiler.EF6

MiniProfiler.MVC4

 

2. Global.cs 中增加

protected void Application_BeginRequest()
 {
    MiniProfiler.Start();
}

protected void Application_EndRequest()
{
    MiniProfiler.Stop();
}

 

3. Global.cs  -> Application_Start 中增加

MiniProfilerEF6.Initialize();

 

4. 视图中增加

@using StackExchange.Profiling
@MiniProfiler.RenderIncludes()

 

5. Web.Config 中增加

<system.webServer>
  <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
  </handlers>
</system.webServer>

 

posted @ 2016-08-29 15:46  `Laimic  阅读(137)  评论(0)    收藏  举报