Click here to Skip to main content
15,867,453 members
Articles / Web Development / ASP.NET
Article

ANTS Profiler by Red Gate Software

30 Sep 2003CPOL4 min read 123.5K   8   20
ANTS Profiler allows you to identify slow lines of code in .NET applications within 5 minutes of installation, allowing you to get on with what you do best – writing code.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

This is a showcase review for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

The Simple .NET Code Profiler

(Click here for your free trial)

If you are involved in .NET development, you have probably become familiar with the situation of having code that sort-of-works, but is quite a long way from the ideal solution. .NET applications often run very slowly or hog system resources, even when they’ve been coded “from the book,” often because more is going on behind the scenes in the .NET library than you might think.

ANTS Profiler is a code profiling tool designed for .NET developers who want to get to the bottom of these and other related issues. Technical testers also use ANTS Profiler to pin bugs down to a specific line of code or to determine scope for optimization.

What ANTS Profiler does

ANTS Profiler allows you to identify slow lines of code in .NET applications within 5 minutes of installation, allowing you to get on with what you do best – writing code. The program can also be used to measure line-level timings and method execution times, and to understand how your application performs.

Profiling an application with ANTS Profiler

ANTS Profiler will profile Windows applications, ASP.NET web applications, COM+ applications and .NET web services.  It supports applications written in VB.NET, C#, C++ (managed) and any other language supported by the .NET framework (this includes over 40 languages).

It is the ideal tool when you’ve developed an application and you need to see if it is going to perform as expected.

The screenshots and explanation below are from ANTS Profiler’s demo application.  Please follow along with this brief introduction to the tool.

Image 1 

This is the main screen of ANTS Profiler. As a first-time user you will need to "Set up a new project for profiling a .NET application."

Setting up a new project

Image 2

To start profiling your application, you need to tell ANTS Profiler what sort of application it is that you are running and any other details that might be important.

Once you've selected your program, you can begin profiling by clicking "OK". In the example here we’ve chosen "mandlebrot.exe", which is the demo application provided by Red Gate.

When you press OK, the application is run and the Profiler measures the lines of code being executed.

Starting and stopping ANTS Profiler

Image 3

This "control" window will pop up and whichever button is shaded will tell you whether or not you are profiling (as decided in your profiler configuration). You may decide to wait before you start profiling, in which case you will need to press the "GO!" button to begin.

Profiling involves you using your application to do the things that you are interested in, while ANTS Profiler is running. ANTS Profiler will gather lots of information about what is happening in your code. Occasionally this can cause your application to slow down - this will have no influence on the accuracy of the results since ANTS Profiler has sophisticated algorithms to take this into account.

Once you've finished, click the "STOP!" button, and the results will be displayed automatically.

Profiling Results

Image 4
Top 100 Slowest Functions

The first set of results displayed are shown in order of their "Procedure time". Procedure time is defined as the time spent in a function,not including sub functions. These results are the most important ones and are, therefore, the statistic of most interest in finding out where your application is spending its time.

"Total" is the amount of time spent in that function, including time in sub functions.

"Hits" are the number of times a function has been called. The other figures are used mainly for checking data validity and in web applications. The results can be sorted according to any of these.

In this case, we might decide to look into more details about what is happening in the 9th function from the top. If we click on this function, ANTS Profiler will provide more details.

Image 5
Details of a Function

This shows the exact lines of code that are taking a long time to execute, which provides a good starting point to improving the code. Although this line of code doesn't take very long to execute, the extreme number of times it is called seems to be causing problems in slowing down the application.

A vital development tool

ANTS Profiler is a simple .NET code profiler that gives you the information you need simply and rapidly. Appropriate pieces of code can then be optimized, so performance is improved, and hardware requirements are lowered.  It is simple to use, and the results produced make it easy for any .NET developer to understand where bottlenecks or problems in code lie.

There are a number of positive reviews of ANTS Profiler, which has been described as "an excellent tool that allows you to really pinpoint those portions of your code that cause the most hassle for your end users."

Evaluate ANTS Profiler with your applications to see how well it will work for you - download a free, fully functional, 14-day trial.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Red Gate Software Ltd.
United Kingdom United Kingdom
Redgate makes ingeniously simple software used by 804,745 IT professionals and counting, and is the leading Microsoft SQL Server tools vendor. Our philosophy is to design highly usable, reliable tools which elegantly solve the problems developers and DBAs face every day, and help them adopt database DevOps. As a result, more than 100,000 companies use products in the Redgate SQL Toolbelt, including 91% of those in the Fortune 100.
This is a Organisation

1 members

Comments and Discussions

 
GeneralRe: All very well but...... Pin
Anonymous14-Apr-04 22:39
Anonymous14-Apr-04 22:39 
GeneralCheck amd Pin
ETA19-Oct-03 4:03
ETA19-Oct-03 4:03 
GeneralRe: All very well but...... Pin
Leahey12-Nov-03 5:26
Leahey12-Nov-03 5:26 
GeneralGood tool however... Pin
Erick Sgarbi1-Oct-03 14:02
Erick Sgarbi1-Oct-03 14:02 
GeneralGood Tool Pin
Richard Green1-Oct-03 9:40
Richard Green1-Oct-03 9:40 
GeneralRe: Good Tool Pin
leppie1-Oct-03 9:53
leppie1-Oct-03 9:53 
GeneralRe: Good Tool Pin
Arun Bhalla8-Oct-03 13:44
Arun Bhalla8-Oct-03 13:44 
GeneralRe: Good Tool Pin
Anonymous2-Dec-04 14:24
Anonymous2-Dec-04 14:24 
GeneralRe: Good Tool Pin
Arun Bhalla2-Dec-04 14:28
Arun Bhalla2-Dec-04 14:28 
GeneralProfileSharp by www.SoftProdigy.com Pin
abathla4-Sep-05 18:09
abathla4-Sep-05 18:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.