开发者

Log slow loading pages

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.

It would not be too hard to implement on my own, but why re-invent the weel.

Thanks


This MSDN article may help: ASP.NET Performance Monitoring, and When to Alert Administrators

This MSDN link is a little more current: Performance Counters for ASP.NET

You could hook into the Request Execution Time performance counter and log as you need.

Google Chrome has a great Timeline tool built into the developer browser tools. It won't log anything or show you what is wrong but it will give you an easy look at where to start looking if you are troubleshooting a single page.


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.

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.


Not specific to ASP.NET environment but maybe you can try Yahoo YSLOW for Firebug.

http://developer.yahoo.com/yslow/


You should take a look at New Relic RPM, I know the Rails version allows slow pages logging, I haven't tested the ASP.NET version yet, but it sould do it :

http://newrelic.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜