MiniProfiler
1.安装MiniProfiler包
PM> Install-Package MiniProfiler
2.在Views下的web.config中引入命名空间:
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="StackExchange.Profiling" />
......
</namespaces>
</pages>
3.在_Layout</body>前加入:
@MiniProfiler.RenderIncludes();
4.在Global.asax中加入:
protected void Application_BeginRequest()
{
if (Request.IsLocal) { MiniProfiler.Start(); } //or any number of other checks, up to you
} protected void Application_EndRequest()
{
MiniProfiler.Stop(); //stop as early as you can, even earlier with MvcMiniProfiler.MiniProfiler.Stop(discardResults: true);
}
5.在web.config中加入(如果MiniProfiler不展示任何信息):
<system.webServer>
...
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
MiniProfiler的更多相关文章
- 采用MiniProfiler监控EF与.NET MVC项目(Entity Framework 延伸系列1)
前言 Entity Framework 延伸系列目录 今天来说说EF与MVC项目的性能检测和监控 首先,先介绍一下今天我们使用的工具吧. MiniProfiler~ 这个东西的介绍如下: MVC Mi ...
- MiniProfiler(MiniProfiler.EF6监控调试MVC5和EF6的性能)
git: https://github.com/MiniProfiler 以前开发Webform的时候可以开启trace来跟踪页面事件,这对于诊断程序的性能是有很大的帮助的,起到事半功倍的作用,今天 ...
- miniprofiler对方法的时间性能检测
miniprofiler对方法的时间性能检测 直接上代码 using StackExchange.Profiling; ... var profiler = MiniProfiler.Current; ...
- miniprofiler的对数据库的监测使用。以nancy,petapoco为例
miniprofiler的使用 miniprofiler的详细介绍请看这里http://miniprofiler.com/.(可以对数据库和页面等监控如 ado ef mvc mongodb) 本文以 ...
- petapoco 使用 MiniProfiler Glimpse监控
PetaPoco是一款适用于.Net(window) 和Mono( linux )的微小.快速.单文件的微型ORM. MVC MiniProfiler是Stack Overflow团队设计的一款对AS ...
- 使用MiniProfiler跟踪MVC + EF + Bootstrap 2 权限管理系统的性能消耗
安装MiniProfiler 在MVC + EF + Bootstrap 2 权限管理系统入门级(附源码)文章中下载了它的源码,调试模式下打开一个页面都要再2.5秒以上,所以使用MiniProfile ...
- 使用MiniProfiler给Asp.net MVC和Entity Framework号脉(附源码)
在学习python开发框架pylons/pyramid的过程中,里面有个非常棒的页面性能监控功能,这样在开发过程中,你能清楚的知道当前页面的性能以及其它参数. 这里介绍一下如何给Asp.net MVC ...
- MiniProfiler 兼容 Entity Framework 6
一直以来都是在用MiniProfiler配合ASP.NET MVC做请求的监控. 在某项目升级Entity Framework 6之后,在执行查询时报错误: --------------无法将类型为“ ...
- 性能工具MiniProfiler在Asp.Net WebForm跟踪EntityFramework
http://www.xuebuyuan.com/356638.html 选择MiniProfiler.EF 默认会把MiniProfiler安装上,笔者程序是Asp.Net WebForm 不需要安 ...
随机推荐
- c# float显示时保存一位小数
UI显示时候,需求保留一位小数 //保留一位小数 参考: http://blog.sina.com.cn/s/blog_620531730100kfz6.html float ff = 1.01f; ...
- xml解析
config.xml <?xml version="1.0" encoding="UTF-8"?> <prize> <gift&g ...
- mysql-5.7.11-winx64.zip 安装配置
1.下载 http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.11-winx64.zip 2.解压缩zip包: D:\Program Files\m ...
- ajax 多级联动 下拉框 Demo
写了ajax实现级联下拉框,考虑常用,并且级联个数随不同业务个数不同,于是就整理了一下,实现了 ajax + N级联动 下拉框的效果 效果图 HTML 代码 <h2> 省级联动</h ...
- Sqlserver内置函数实现MD5
16位: SELECT substring(sys.fn_sqlvarbasetostr(HashBytes('MD5', '需要加密字符串')),3,16) 32位 SELECT substring ...
- perl
introduction: http://www.yiibai.com/perl/perl_introduction.html functions: http://www.yiibai.com/per ...
- Ubuntu中配置Java环境变量时,出现command not found问题解决记录
百度出Ubuntu中配置Java环境变量时,在利用sudo gedit /etc/profile 对profile编辑后, 在terminal中输入 sudo source /etc/profile, ...
- 设计向 20款优秀免费的Icons图标合集 (转)
Pioneer Icons Free Sample Sketch Resource Zodiac Icon Set Sketch Resource 90 Pixel Perfect Halloween ...
- IIS请求筛选模块被配置为拒绝超过请求内容长度的请求
HTTP错误404.13 - Not Found 请求筛选模块被配置为拒绝超过请求内容长度的请求,原因是Web服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值(IIS 7 默认文件上传大 ...
- Android开发笔记之《特斯拉-Tesla 代码分析》
转载请注明出处 一.反编译APK文件,查看包结构 // Android库,不多解释android.support // HttpClient 4.1 repackaged for Android // ...