ANTS Profiler 3   

Working with ANTS Profiler

See Also

This topic provides an overview of how you use ANTS Profiler.

Working with projects

Whenever you profile an application, you set up a project using the Profiler Project Wizard. A project contains information such as the type of profile (performance or memory) and the location of the application.

When you start ANTS Profiler, the Profiler Project Wizard opens automatically with the settings of the last project you ran. For information about starting ANTS Profiler without displaying the Profiler Project Wizard, see Starting ANTS Profiler from the command line.

If you will always be profiling the same parts of an application, you can save the project to a file. You can then open the project file at a later date. ANTS Profiler project files are saved with the extension .profiler

To open an existing project:

To save a project:

Profiling applications

You profile your application using the commands in the main toolbar or on the Profiler menu:

Start profiling starts the application you specified in the Profiler Project Wizard and records profiling information
Take snapshot records a set of profiling results and leaves your application running
Reset Profiler discards all results recorded since you started profiling and leaves your application running; available only for performance profiling
Disable profiler stops profiling (temporarily) and leaves your application running; available only for performance profiling. You can disable profiling before you start your application and when you reach the part in which you are most interested, you can then enable profiling to start collecting results.
Enable profiler restarts profiling if you stopped it; available only for performance profiling
Stop profiling stops profiling, discards the results, and closes your application; if you take any snapshots, the results for the snapshots are not discarded.
Force GC cleans up objects that are no longer required by forcing garbage collection; you may want to do this before you take a snapshot to ensure there are no objects awaiting finalization; available only for memory profiling

Working with profiling results

Whenever you take a snapshot, ANTS Profiler displays a summary of the results in the main window. You can view these results while your application is still running. For details about the summary, see Summary Panel (Performance) or Summary Panel (Memory).

If you are profiling performance, when you finish profiling your application and you close it, ANTS Profiler automatically takes a snapshot (unless you are profiling an XBAP application) and displays a set of results for that snapshot. You can display the results for other snapshots by double-clicking the required results set in the Results panel.

You can sort, group, or filter columns in the All methods, All objects, or All classes panels. If your application is multithreaded, you can display the results for a particular thread.

If required, you can export the results in HTML or XML format. For performance results, the results that are displayed in the All methods panel are exported; for memory profiling results, the results that are displayed in the All objects panel and the All classes panel are exported. To do this:

When you have finished reviewing the results, you can save the results by clicking the save button in the toolbar.

To open a set of saved results:

If you are using a trial version, and your trial has expired, you can still view the results that have been saved to a file, and then export them if required.

Performance results

If you find that ANTS Profiler generates too much data, you can:

If ANTS Profiler is not generating data for all the assemblies that your application uses, such as .NET Framework assemblies, select All .NET methods when you set up the project using the Profiler Project Wizard.

Memory usage results

You may find it useful to take several snapshots when you profile your application. When you review the results, in the All objects panel, you can filter by New objects in the Comparison column to see only those objects created since the last snapshot. To find the objects that remain live the longest, you can sort by the Age column.

 

 

 


© Red Gate Software Ltd 2007. All Rights Reserved.