È possibile creare il proprio piccolo monitor di test delle prestazioni. Questo è da pagina 670 del libro di Steven Sanderson, Pro Asp.Net MVC 2 quadro:
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);
}
};
}
}
Quindi aggiungere al vostro web.config:
<add name="PerfModule" type="Namespace.PerformanceMonitorModule, AssemblyName"/>
fonte
2012-10-19 22:26:51
Scott ha anche un [messaggio] (http://www.hanselman.com/blog/IfYoureNotUsingGlimpseWithASPNETForDebuggingAndProfilingYoureMissingOut.aspx) su Glimpse, ok cosa ne pensi su ** min profiler vs glimpse **, da usare quando si profila un sito di shopping online? – stom