This step-by-step article describes how to measure ASP.NET responsiveness by using the Microsoft Web Application Stress (WAS) tool. The responsiveness of ASP.NET applications can be measured by using tracing, by using the Performance snap-in, or by using the WAS tool. The WAS tool generates an artificial load on a Web server. You want to do this to measure responsiveness, to test scalability, and to tune performance. The WAS tools generates reports that detail the time a Web server takes to respond and to transfer files. This is a critical metric that is used to tune performance. The WAS tool works with any type of Web application. However, there are four considerations for using the WAS tool to most effectively identify performance issues with an ASP.NET application. These considerations are listed in the "Configure the Web Application Stress Tool" section.
You must pay attention to the considerations that follow when you configure the WAS tool to test an ASP.NET Web application:
You must configure a warm-up period to permit the application to compile and to cache. If you do not configure a warm-up period, the report shows artificially low responsiveness. This does not accurately reflect the behavior of the application under typical use.
You must enable cookies, but do not record them as part of the script. This makes sure that each virtual user who is simulated by the WAS tool initiates a separate ASP.NET session.
You must enable random delay. This prevents requests being sent to the server faster than the events can be processed.
You must configure the WAS tool to run for several minutes. This makes sure that sufficient requests are processed to generate useful statistics.
To configure settings in the WAS tool, follow these steps:
Install and then run the WAS tool.
Create a new script.
For information about how to create scripts, see the WAS tool Help files.
In the Microsoft Web Application Stress window, expand your script and then select Settings.
Set the Stress Level field and the Stress Multiplier field to 1.
Set the Test Run Time to 10 minutes or more.
Select Use Random Delay. Set the Min field to 2000 or more if pages take longer than two seconds to run.
Set the Max field to 5000.
Set the Warmup period to at least 1 minute to permit time for ASP.NET to compile and then cache the application after the first request.
Click to select the Users, Passwords, And Save Cookies check box.
Create and then run the script by using any of the standard methods. To do this, see the WAS tool Help files.
Interpret Results to Understand Application Responsiveness
After you configure a Web Application Stress script and then run the script against an ASP.NET site, you can examine the results to understand application responsiveness. Application responsiveness is a key component of actual page load times and the overall user experience. To view your results after you run the script, follow these steps:
On the View menu, click Reports.
Expand your report item of the script and then select the most recent time.
The right pane displays a summary of the report.
Move to the Page Summary section.
For each page in your script, examine the Hits, the TTFB Avg column, and the TTLB Avg column.
The Hits column shows the number of requests that are executed against that page. The number of hits must be greater than 10. This makes sure that sufficient requests were issued to generate a useful average. If Hits is less than 10, increase the Test Run Time field in the script settings and then reexecute the script.
The TTFB Avg column measures the average time (in milliseconds) that the application took to return the first byte of the ASP.NET page. This measurement reflects the time from the request that the user issued to the time when the browser of the user starts to render the page. This is the most significant server-dependant factor in the perceived speed of the site. This measurement relates closely to the time that it takes for ASP.NET to render the page. This measurement also reflects configuration changes that affect performance.
The TTLB Avg column measures the average time (in milliseconds) that the application took to return the last byte of the ASP.NET page. This measurement reflects the time from when the request is issued by the user to the time that the whole page is downloaded. While browsers typically start to render pages after they receive the first byte, the whole page is not visible until after the last byte is transferred.