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 不需要安 ...
随机推荐
- Hibernate入门学习-安装hibernate插件
最近一直在学习ssh框架,为了更方便hibernate的使用,所以在eclipse下载hibernate插件,安装插件有两种方法 第一种:本地安装 1).插件的官网下载地址:http://tools. ...
- Linux下使用crontab定时备份日志
上周学习了Linux,其中有使用crontab定时备份日志的内容,现把主要步骤记录如下: 首先需要备份的日志的源目录位于/opt/lampp/logs/access_log 备份到/tmp/logs下 ...
- Linux系统下输出某进程内存占用信息的c程序实现
在实际工作中有时需要程序打印出某个进程的内存占用情况以作参考, 下面介绍一种通过Linux下的伪文件系统/proc 计算某进程内存占用的程序实现方法. 首先, 为什么会有所谓的 伪文件 呢. Linu ...
- [LeetCode] Android Unlock Patterns 安卓解锁模式
Given an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤ 9, count the total ...
- [LeetCode] Maximum Product of Word Lengths 单词长度的最大积
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the tw ...
- 简单的浏览器调试——console命令
一.显示信息 <script type="text/javascript"> console.log('hello'); console.info('信息'); con ...
- 创建ejs模板的express工程
npm install -g express npm install -g express-generator express -e projectName cd projectName npm in ...
- Django补遗(一)
链接MYSQL数据库 修改项目中的配置文件: DATABASES = { 'default': { # 'ENGINE': 'django.db.backends.sqlite3', # 'NAME' ...
- ActiveMQ入门
ActiveMQ简介 概要 开源 JMS-compliant 消息中间件message-oriented middleware(MOM) 松耦合,相对于RPC的紧耦合 发送消息fire-and-for ...
- BZOJ1303 [CQOI2009]中位数图
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...