I'd like to add a simple web part to one of our pages to track the load time of the page and display it to the user. Although I thought this would be common / easy to google it doesn't appear to be the case. How can something like this be done, simply?


I've never tried this with SharePoint, but you could investigate the following functionality:

Taken from https://stackoverflow.com/a/2818117, pertaining to ASP.NET.

You could turn on Trace. There you will get a bunch of information about the Page lifecycle( including time stamps), and other useful profiling information.

Turn on trace for a page in the Page directive at the top of your aspx file:

<%@ Page Trace="true" %>

Or dynamically in code:

Trace.IsEnabled = true;

Or globally in the app setting this in web.config:

  <trace enabled="true" requestLimit="40" localOnly="false"/>
  • Thanks, I'll take a look at the documentation and see if it applies to my situation :)
    – Michael A
    Aug 22 '12 at 23:23
  • Unfortunately this doesn't seem possible from within a web part :(
    – Michael A
    Aug 23 '12 at 4:30
  • I know with SharePoint 2010, these are displayed and are accessible via the "Developer Dashboard", however, it does appear people have done this in ASP.NET using ASCX controls. Perhaps, you can utilize that lead; stackoverflow.com/q/308713. Aug 23 '12 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.