ANTS Profiler™
Performance test powered by Red Gate

By Michael Stumpf
This article is a translation of the German article "Leistungsträger: Performance Test powered by Red Gate", published in issue 6.2003 of dot.net magazin.
The question of performance in application development has recently become more and more important. Performance is particularly important in web applications which are often intended to handle thousands of simultaneous users. This article presents two performance-testing tools from Red Gate: ANTS Load, for testing the performance of websites and ANTS Profiler, a code profiling and coverage tool for .NET applications.
Did you know that, according to a study by the Newport Group, approximately 52% of all complex web applications are not scalable? And that only 25% of all web applications are tested for their performance and scalability? So it is surely not surprising that many users of these applications soon complain about their speed, and start looking around for other software solutions. It is therefore clearly vital to test your own software, whether in web or in Windows applications. The English software house, Red Gate, puts a number of test tools at your disposal, with which you can do just that.
ANTS Load
ANTS Load – ANTS stands for Advanced .NET Tool Suite – is software with which the performance of web applications, web services, and their web servers can be tested. For this purpose – like in Microsoft's competing product Application Center Test – a test script is recorded in the browser which contains all the user's actions. This script can, of course, be edited manually after compiling. ANTS Load uses Visual Studio for Applications as a scripting environment.
After a test script is recorded or manually built it can be executed. Here, users are offered a whole range of different options. They can choose how long the test of the web server will take, which available data for secure web applications should be used, if all simultaneous test clients should send their requests to the web server at the same time or in random batches, whether SSL is needed for the connection, and so on.
After the test run is completed all the collected data is clearly presented. This begins with connection response data: here the user is shown how much time passed between the first and last bytes, how long it took to show a complete page, or individual objects on that page, and a whole range of other data (see Screenshot 2). Information about the server and the load on it during the test run is also shown. In this way, ANTS Load gives you access to a whole range of performance data (processor/memory capacity, read and write events, and so on). With this data you can create reports about the scalability and speed of the web application or service, so that you can keep your website users happy, through early adjustment to code and hardware.
Red Gate provide three editions of ANTS Load, on which a maximum of, variously, 25, 100, and unlimited simultaneous connections can be run. With the largest of these three versions you can even distribute the test scenario to several test clients.
| Screenshot 1. Running a test script | Screenshot 2. The results of a test run |
ANTS Profiler
With ANTS Profiler you can monitor the flow of .NET applications. Here, the frequency of the function calls and the time taken by each one are recorded. If the source code is available, you can even get this information for each line.
Basically, with ANTS Profiler you can monitor Windows applications and COM+ components as well as web applications or web services.
Once the profiling of an application is completed, the results are presented in tabular form. Screenshot 3, for instance, shows the function call frequency and time next to the individual method names. Here, for example, the slowest functions in an application can also be filtered, so that the programmer has a starting-point for the performance optimization of the application. If the location of the source code is known to ANTS Profiler, you can collect recorded performance data not only per method but even per line. The data is indicated directly next to the code lines in conjunction with a small diagram, as shown in Screenshot 4.
| Screenshot 3. Tabular view of methods in ANTS Profiler Screenshot | Screenshot 4. Report of performance data even for individual lines of code |
Conclusion
In economically difficult times it is very important to give your clients not just error-free but also user-friendly and, above all, fast software. For this very reason, the opportunity to obtain, without great expenditure, an overview of performance and vulnerability in your own software is becoming more and more interesting – and even vital. In this article we have met two tools which enable you to do exactly that, and which surely deserve closer consideration!





