You can create your own performance monitor. This is from page 670 of Stephen Sanderson's book, Pro Asp.Net MVC 2 Framework:
public class PerformanceMonitorModule : IHttpModule { public void Dispose() { /* Nothing to do */ } public void Init(HttpApplication context) { context.PreRequestHandlerExecute += delegate(object sender, EventArgs e) { HttpContext requestContext = ((HttpApplication)sender).Context; Stopwatch timer = new Stopwatch(); requestContext.Items["Timer"] = timer; timer.Start(); }; context.PostRequestHandlerExecute += delegate(object sender, EventArgs e) { HttpContext requestContext = ((HttpApplication)sender).Context; Stopwatch timer = (Stopwatch)requestContext.Items["Timer"]; timer.Stop(); if (requestContext.Response.ContentType == "text/html") { double seconds = (double)timer.ElapsedTicks / Stopwatch.Frequency; string result = string.Format("{0:F4} sec ({1:F0} req/sec)", seconds, 1 / seconds); requestContext.Response.Write("<hr/>Time taken: " + result); } }; } }
Then add to your web.config:
<add name="PerfModule" type="Namespace.PerformanceMonitorModule, AssemblyName"/>
Mike richter
source share