I’m getting complaints from users that an ASP.NET web application I’m responsible for supporting is intermittently slow. How can log page generation time data so that I can quantify if this is the case, and if so which pages are slow, and what time of day. I don’t want this information displayed to the user, I just want to log it somewhere for every page request and then I’ll take a look at the logs on a daily or weekly basis and import them into a database or excel for manipulation.
I looked at some SO questions that discuss turning on tracing but I haven’t been able to determine where that trace data gets logged.
Extra points for being something that doesn’t require a code change as this is a production system and I would like to be able to use whatever performance counters and existing log functionality that is provided out of the box instead of rolling my own if possible.
IIS Logs, Easiest thing to start with, also requiring least changes. Make sure that “Time Taken” is ticked in the IIS Manager. Default location of the logs will be somewhere here %SystemDrive%\inetpub\logs\LogFiles, (you’ll need to identify your web server instance). The time taken field in milliseconds will be appended to request log line. You can import it to excel, or use tools like IIS Log analyzer.
Trace.axd in web.config, make sure the trace is enabled.
navigate to application, do something there. then go to http://yourhost/yourApp/Trace.axd, it will display timings from the start for each page events. Some information can be gathered from there. But it’s not much.