Tip #60: Did you know… How to Profile an ASP.Net site?


1. Create a asp.net web application in Visual Studio Team Edition For Developers

2. Write some code inside Page_Load function

protected void Page_Load(objectsender, EventArgs e)
{
    int sum = 0;
    for(int i = 0; i < 2000000; i++)
    {
        sum += i;
    }
    Response.Write(sum);
}

3. Launch performance wizard

image

4. Select the application (default) and select next

image

5. Choose Sampling, and select next

image

6. Click Finish

7. Launch with Profiling

image

8. Perform actions on IE and close it when it’s done

9. Performance report Summary is going to be displayed

image

 

For complete detail reading, please refer to http://msdn.microsoft.com/en-us/library/bb385749.aspx (

Getting Started with Profiling Tools)

 

Xinyang Qiu

SDETII | Visual Web Developer


Comments (13)

  1. What's New says:

    1. Create a asp.net web application in Visual Studio Team Edition For Developers 2. Write some code inside

  2. Rob says:

    Is there a way to something similar to this without team system?

  3. DarthSwian says:

    Should be "Did you know… How to PROFILE and ASP.Net site?" – Sorry, grammar’s not that important but the headline should be correct.

  4. Thank you for submitting this cool story – Trackback from DotNetShoutout

  5. Bill says:

    Should be "Did you know… How to Profile AN ASP.Net site?" – grammar is important

  6. If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord

  7. ASPInsiders says:

    If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord.com/JasonNGaylord

  8. Hi,

    Very nice article. Does this include’s both client side and server performance ?

    Thanks,

    Thani

  9. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. New on Visual Studio Gallery: Quick Open File for Visual Studio 2008 Tomasz Modelski explained how to pre-generate lazy loading proxies

  10. xinqiu says:

    Title changed.  Thanks, DarthSwian and Bill.

  11. xinqiu says:

    Rob, looks like only a few editions have profiling functionality in vs2008.  Check out http://msdn.microsoft.com/en-us/library/dd164415.aspx

  12. xinqiu says:

    Thanigainathan, only server side is included in VS2008 profiling.

Skip to main content