性能工具MiniProfiler在Asp.Net WebForm跟踪EntityFramework
2013-06-01 23:22
471 查看
性能工具MiniProfiler在Asp.Net WebForm跟踪EntityFramework
1:安装MiniProfiler使用Nuget安装:
选择MiniProfiler.EF 默认会把MiniProfiler安装上,笔者程序是Asp.Net WebFrom 不需要安装MiniProfiler.MVC3
2: 在Global.asax中添加下面代码:
void Application_BeginRequest()
{
if (Request.IsLocal)
{
MiniProfiler.Start();
}
}
void Application_EndRequest()
{
MiniProfiler.Stop();
}
void Application_Start(object sender, EventArgs e)
{
StackExchange.Profiling.MiniProfilerEF.Initialize();
}
3:在页面中添加
protected override void OnPreRender(EventArgs e)
{
Response.Write(StackExchange.Profiling.MiniProfiler.RenderIncludes());
base.OnPreRender(e);
}
4:浏览该页面
点击左上角会出现,点击sql出现:
相关文章推荐
- 性能工具MiniProfiler在Asp.Net WebForm跟踪EntityFramework
- 性能工具MiniProfiler在Asp.Net WebForm跟踪EntityFramework
- ASP.NET MVC性能调试工具-MvcMiniProfiler
- ASP.NET MVC性能优化工具 MiniProfiler
- asp.net mvc ef 性能监控调试工具 MiniProfiler
- 使用MiniProfiler调试ASP.NET MVC网站性能
- 实例分析ASP.NET在MVC5中使用MiniProfiler监控MVC性能的方法
- 使用MiniProfiler调试ASP.NET MVC网站性能
- 使用MiniProfiler调试ASP.NET MVC网站性能
- 使用MiniProfiler调试Asp.net Mvc性能
- 使用MiniProfiler调试ASP.NET MVC网站性能
- 使用MiniProfiler调试ASP.NET web api项目性能
- ASP.NET MVC5 使用MiniProfiler 监控MVC性能
- asp.net mvc 性能测试工具 - Glimpse
- .NET性能分析工具 - YourKit Profiler 8 for .NET
- 使用MvcMiniProfiler调试ASP.NET MVC网站性能
- 使用MvcMiniProfiler调试ASP.NET MVC网站性能
- NET程序内存分析工具CLRProfiler的使用(性能测试)
- Asp.net Webform 使用Repository模式实现CRUD操作代码生成工具
- 推荐asp.net调试工具:miniASPNETServer