ANTS Profiler box shot

ANTS Profiler

ANTS Profiler Review (Red Gate)

This article is a translation of the French article "Test de ANTS Profiler (Red Gate)", published at Developpez.com.

Publication date: 09/11/2005, Update date: 09/11/2005

I. Presentation
  A. Official site
B. Tested utility
II. Installation
III. Application types that can be analyzed
IV. Profiler types
  A. Performance (execution speed)
    1. Analysis filters
2. Analysis reports
3. Export in .html
  B. Memory
    1. Snapshots
2. Analysis reports
3. Export in .html
V. Backing up projects and results
VI. Conclusion
  A. Who for?
B. Price
C. Anecdote

I. Presentation

Red Gate has requested us to evaluate several of its applications.

A. Official site

ANTS Profiler official site (Red Gate software)

B. Tested utility

The first tested utility is ANTS Profiler. Its aim is to allow the developer to determine the areas that can be improved in his .NET applications.

Indeed, the version used in this test, 2.6, supports equally well the .NET framework 1.x and 2.0.

It works fully independently. As a result, it does not require Visual Studio or any other software.

II. Installation

The installation programme can be downloaded from the Internet from the ANTS Profiler official site (Red Gate software). It is quite small; it is only around 6 MB.

To sum up the ANTS Profiler installation, one can say that it is a typical "next, next, next" installation. In short, it is a typical installation wizard. The first test is then conclusive, as it is simple and without mishap.

III. Application types that can be analyzed

As one can see on the following picture, several types of applications can be analyzed:

They are:

  • Windows .NET applications
  • Web .NET applications
  • .NET services
  • COM+ server applications

Choose what to profile
For instance, in the case of Web applications, ANTS Profiler stops the IIS server before starting it again. It thus allows ANTS Profiler to carry out the different analyses.

IV. Profiler types

ANTS Profiler performs several analysis types. It is possible to analyze the application performance and its memory usage.

Choose a profiler type

A. Performance (execution speed)

The first part of the application carries out a performance analysis. That way, you can use your applications as normal, and afterwards see the time taken by the different methods in your application.

1. Analysis filters
The application distinguishes between the methods which have available source code and the others (for instance, the methods for base Namespaces). That way, it is possible to view the specifically developed methods on their own.

Choose what code to profile

Furthermore, when the code is available, it is displayed as the developer wrote it, which is a great advantage for the developer performing the analyses.

2. Analysis reports
The results can be displayed as a summary. This summary contains several items:

  • longest code lines to be executed

Longest code lines to be executed

  • methods that took the longest time

Methods that took the longest time

  • breakdown of time taken by line of code

Breakdown of time taken by line of code

On that last example, one can see that it is the opening of the connection that takes the longest. One can improve the application by reducing the number of openings/closings of the connection.

Moreover, the "new SqlParameter", which isn't required, also takes time. For example, to reduce execution time, one could use the .Parameters directly instead of creating the object.

3. Export in .html

Export in HTML

B. Memory

1. Snapshots
The objects' life is managed by the .NET framework, as most of you already know. The items' destruction is done according to the memory needs of the framework. Thus, it is better to use memory pictures at a given time. This utility allows us to create these "snapshots". These "snapshots" are very easy to take with a single button:

Take snapshot

To summarize, snapshots allow us to compare memory usage at different times in the application's life.

2. Analysis reports
As the following example shows, it is very difficult to imagine the number of objects created in the life of an application (more than 43,000 in this case).
Memory Profiler results summary

It is therefore possible to have a summary (previous snapshot) or even the detail by object.

Memory Profiler - group by object

3. Export in HTML
To display the information, one can export the results in XML or in HTML, as the two following screenshots show:

Export in HTML

Export in XML

V. Backing up projects and results

The different results can be saved, so they can be used later.

Save for later

VI. Conclusion

A. Who for?

Whether you are a beginner or advanced in the field of performance analysis, you will find this utility useful.

Indeed, as a beginner, you will access directly and easily the different results. For the advanced, this utility is equally useful as more "complex" results are available in the various reports.

B. Price

Of course, this utility isn't free... but compared to the cost of additional development and testing, it can seem good value for money.

C. Anecdote

One will note that Red Gate is very advanced compared to its competitors as, according to the application home screen, it was created in 1999 and still exists in ... 2006:-)