登录网页加载速度缓慢 [英] Log slow loading pages
问题描述
你们是否知道一个库/ HTTP模块在ASP.NET环境下登录网页加载速度缓慢(也许是一个特定的treshold)?
Do you guys know of a library/httpmodule for logging slow loading pages (perhaps for a specific treshold) in an ASP.NET environment?
谷歌没有取得任何结果。
Google did not yield any results.
它不会太为难我自己来实现,但为什么重新发明WEEL。
It would not be too hard to implement on my own, but why re-invent the weel.
感谢
推荐答案
正如我在大需要这一点,我结束了使用写我自己的一个的HttpModule
和简单的秒表
。这是一个快速和肮脏的工作,但它是对我好现在。它记录的日期和时间,以秒加载时间,请求的URL和POST变量,如果有的话。
As I was in big need for this, I ended up writing my own using a HttpModule
and a simple Stopwatch
. This is a quick and dirty work but it's OK for me for now. It logs date and time, loading time in seconds, requested url and POST variables if any.
如果有人有兴趣,来源是这里。你只需将它添加到你的的HttpModules
部分在你的web.config像这样:
If anyone is interested, the source is here. You just add it to your httpModules
section in your web.config like so:
<httpModules>
<add name="SlowPageLogger" type="Namespace.BaseModule, Namespace" />
</httpModules>
不过,如果有人想出了一个图书馆,我很乐意接受这个答案了。
However, if someone comes up with a library, i'm more than happy to accept that answer.
这篇关于登录网页加载速度缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!