There are a lot of tools to help you test and monitor the performance of your web application. Microsoft Visual Studio .NET provides Application Center Test 1.0 (ACT) that simulates a large number of users by opening multiple connections to the web server and transmitting HTTP requests. ASP.NET includes a number of performance counters that you can use these performance counters to track applications. You can also use the built-in ASP.NET trace function to track the code execution of the page or application.
ACT is designed to perform pressure testing of web servers and analyze the performance and scalability issues of web applications. For more information on ACT, install Visual Studio .NET and open the ACT document, or perform a search on the MSDN located at http://microsoft.com/china/msdn.
Unlike traditional Active Server Page (ASPs) of the entire server computer global open performance counter, most ASP.NET performance counters are open to a single application. In the System Monitor Tool (Perfmon), there are counters for a single application under the ASP.NET Applications Performance Object. If there are multiple applications on the server, you need to select a specific application instance when you select a counter. However, there is a special __total__ application instance in Perfmon, which is the counter value of all applications on the server. __Total__ is usually the sum of the counter values.
ASP.NET also discloses a global counter that is not limited to a specific application instance. These counters are located under the ASP.NET performance object. To view all available ASP.NET counters on a Windows 2000 Server computer, use the following steps.
View the ASP.NET counter available on Windows 2000 Server computers
From the "Start" button to "Programs", point to Administrative Tools, and then click Performance. Click View Report in Perfmon. Click Add. Select "ASP.NET Applications", select All Counters, and then click Add. Select "ASP.NET System", select All Counters, and then click Add.
View ASP.NET counter on Windows XP machine installed on IIS
From the Start button, click Run. Enter "Perfmon" in the "Open" text box, click OK. Click View Report in Perfmon. Click Add. Select "ASP.NET Applications", select All Counters, and then click Add. Select "ASP.NET System", select All Counters, and then click Add.
For each ASP.NET system and an ASP.NET application performance counter, see the performance counter for ASP.NET.
ASP.NET contains tracking features that display important execution time information between continuous tracking output statements, as well as information about server control hierarchies, useful view status quantities, and controls on the page. For more information on tracking, see ASP.NET Tracking.
Since ASP.NET is running over the public language running library, it is possible to completely analyze the web page, from the entry point to all intermediate layer objects to the end. This analysis is impossible in ASP, which provides a good tool for performance work in ASP.NET. In addition, all analyzers of the public language runtime can analyze the ASP.NET page. If the public language runtime analysis service is known, there is no need to pre-standardize the user's code; this will be completed at runtime. For more information on the analyzer, see Debugging and analyzing applications. There are two main types of analyzers: call attribute analyzer and sampling analyzer. Calling the Property Analyzer Allows you to view all method calls for the page or application, and you can give each method call and the specific execution time of the sub-method call thereof. This type of analysis is to analyze the code path and try to organize them. However, if performing the running of code paths that have not been specified (for example, when calling COM or native methods from ASP.NET), the analyzer cannot track when it is called. In this case, the analyzer is attributed to the last method of the specification code. For more information on the code in your code, see Debugging and analyzing applications.
The difference between the sampling analyzer is in advance in advance. This analyzer is substantially separated by the specified time interval or in accordance with the CPU, sampling the CPU and tracks the code content being executed. Then, it can provide users with what kind of code that is most executed in that time. This type of analysis type is most useful to troubleshooting and exclusion, lock / resource contention, and performance bottlenecks.
When you want to run a steady state, it is best to ignore the maximum initialization of the first request and object one-time initialization. For example, when requested an ASP.NET page for the first time, there is always a cost of compiling the Page class instance. Once this has occurred, the performance of subsequent requests will increase.
For more information on performance monitoring in .NET Framework, see Monitor Performance Thresholds.