ANTS Performance Profiler - 6.0
Learning ANTS Performance Profiler - 6.0
Profiling from the command line
You can use ANTS Performance Profiler Professional from the command prompt which allows you to include profiling in automated build and test procedures. To do this run Profile.exe with the appropriate options.
For example, to profile an executable called SimpleApp.exe using line-level timings and saving results as a CSV, use:
Profile.exe /e:"C:\testing\SimpleApp.exe" /ll /csv:"C:\testing\results.csv"
Options
/help (Alias: /?)
Displays this help message. Use in conjunction with /verbose for more detailed information.
If this switch is used with any switches other than /verbose, /html, /out, /force or /outputwidth then those switches will be ignored, the help message will be printed, and 0 will be returned as the process exit code.
/html
Causes help to be output as HTML.
Must be used with the /help switch.
/quiet (Alias: /q)
Quiet mode - no output.
/verbose (Alias: /v)
Verbose mode.
/force (Alias: /f)
Forces overwriting of output files that already exist. If this flag is not set and a file already exists then program will exit with an exit code indicating an I/O error.
/argfile:<argfile>
File containing XML argument specification.
/out:<fileName>
Redirects console output to the specified file.
/project:<project> (Alias: /p)
A performance profiler project that should be used to begin profiling.
/executable:<executable> (Alias: /e)
An executable to run in the profiler.
/arguments:<arguments> (Alias: /args)
The arguments to pass to the executable.
/workingDirectory:<workingDirectory> (Alias: /wd)
The working directory to use when profiling the application.
/port:<port>
The port that web projects should accept connections on. (Default: 8013)
/cassini (Alias: /webdev)
Profiling should be performed on the ASP.NET web development server (Cassini).
/cassiniPath:<cassiniPath> (Alias: /cpath)
The location of the ASP.NET project to use with the ASP.NET web development server (Cassini).
/cassiniVirtualDirectory:<cassiniVirtualDirectory> (Alias: /cvd)
The virtual directory to use for the ASP.NET web development server (Cassini).
/cassiniNetVersion:<cassiniNetVersion> (Alias: /cnv)
If Visual Studio 2010 is installed, this is the version of .NET to use when running the web development server (Cassini). Default: 0
/service:<service>
The name of a Windows service to profile.
/complus:<complus>
The name of a COM+ server to profile.
/silverlight:<silverlight>
The URL of a site containing a Silverlight application to profile.
/profileSubprocesses (Alias: /sp)
The profiler should profile both the target and any child processes it spawns.
/timeout:<timeout> (Alias: /t)
The number of seconds to wait before terminating the target process. Set to 0 to indicate that no timeout should be used. The default is 120 seconds.
/lineLevel (Alias: /ll)
The profiler should record line-level timings as well as method-level timings.
/methodLevel (Alias: /ml)
The profiler should record only method-level timings (the default).
/onlyWithSource (Alias: /ows)
The profiler should only record values for methods which have source code files specified in their debugging data (pdb) files.
/sampling (Alias: /sm)
The profiler should use sampling to produce approximate results quickly.
/includeSource:<includeSource> (Alias: /is)
Whether or not the results should include the source code. Permitted values are on and off. The default is on.
/inlining:<inlining> (Alias: /in)
Default: on
Whether or not the profiler should allow .NET to inline functions. Turning this off will produce results for more methods, at the expense of a less accurate reflection of the processes performance. Permitted values are on and off. The default is on.
/compensate:<compensate> (Alias: /comp)
Whether or not the profiler should adjust results to account for its own overhead. Permitted values are on and off. The default is on.
/simplify:<simplify> (Alias: /simp)
Whether or not the profiler should simplify certain complicated stack traces to reduce resource requirements. Permitted values are on and off. The default is on.
/avoidTrivial:<avoidTrivial> (Alias: /notriv)
Whether or not the profiler should avoid extremely trivial functions to reduce resource requirements. These functions have a low hitcount and a running time of only a few processor cycles. Permitted values are on and off. The default is on.
/aspxPages:<aspxPages> (Alias: /aspx)
Whether or not the profiler should profile the compiled contents of ASPX pages as well as the code that lies behind them. Turning this option on may considerably increase the amount of time the application spends in the JIT. Permitted values are on and off. The default is off.
/threshold:<threshold>
The threshold time in percent that a method must have used in order to be included in the report. Set to 0 to include all results. The default is 0.1.
/csv:<csv>
The name of a file to write a summary of the profiler results as CSV data to.
/xml:<xml>
The name of a file to write a summary of the profiler results as XML data to.
/htmlreport:<htmlreport> (Alias: /h)
The name of a file to write a summary of the profiler results as an HTML report.
/calltree:<calltree>
The name of a file to write a summary of the call tree profiler results as XML data to.
/calltreehtml:<calltreehtml> (Alias: /cth)
The name of a file to write a summary of the call tree profiler results as an HTML report.
/data:<data>
The name of a file to save the profiler results to. The contents of this file can be inspected using the ANTS profiler desktop application.
Exit Codes
If an error occurs, the following exit codes may be displayed:
0 Success.
1 General error code.
3 Illegal argument duplication. Some arguments may not appear more than once in a command-line. If such arguments appear more than once this exit code will be returned.
8 Unsatisfied argument dependency or violated exclusion when user runs command line. E.g. /arg2 depends on /arg1 but you have specified /arg2 without specifying /arg1, or alternatively /arg2 cannot be used with /arg1 but you have tried to use them both.
32 Value out of range. Numeric value supplied for an argument that is outside the range of valid values for that argument.
33 Value overflow. The magnitude of a value supplied for an argument is too large and causes an overflow.
34 Invalid value. The value supplied for an argument is invalid.
35 No / invalid software license or trial period has expired.
64 General command-line usage error.
65 Data error. Some input data required by the tool is invalid or corrupt.
69 A resource or service required to run the tool is unavailable.
73 Failed to create report
74 IO error occurred. Generally returned if the program attempts to write to a file that already exists without the user having specified the /force option.
77 Action cannot be completed because the user does not have permission.
126 Execution failed because of an error.
130 Execution stopped because Ctrl+Break.
Profiling IIS from the command line
You cannot currently profile applications which run on IIS from the command line. To work around this limitation:
- Profile IIS from the ANTS Performance Profiler graphical user interface.
- When you have finished profiling, on the File menu, click Save Project.
- Use the
/projectargument on the command line to load the saved project.
Was this article helpful?
ANTS Performance Profiler
- Installation error 5100 when installing ANTS Performance Profiler and ANTS Memory Profiler
- Attach to process unavailable with some anti-virus software
- Memory leaks observed when profiling Windows Presentation Framework (WPF) applications
- Log files
- The manifest for the SQL server event source did not match the generated events. Some SQL events may report incorrect data. To fix this issue, consider recompiling etwcls.mof
- Setting file I/O and child process profiling in high DPI modes
- HTTP request timings in IIS
- Profiling web services in IIS Express
- Method not found: 'UInt32 <Module>._ANTS_Begin_Sql(System.String)'
- Enabling line-level timings for SecurityTransparent code
- Profiling SharePoint 2010 in v6.0 - 6.3
- Profiling SharePoint subsites
- Problems synchronizing results
- Windows service profiling fails if the service uses a system account
- Profiling assemblies protected with DeployLx
- The type initializer for 'y.layout.hierarchic.ClassicLayerSequencer' threw an exception
- Forcing your application to use .NET 4
- Double hit counts occurring on one line
- System.EntryPointNotFoundException (Versions: 3,4 only)
- Methods in (ASCX) web controls may not appear
- Failed to CoCreate Profiler error profiling a Windows service
- Multiple-core portable computers may show inflated times (version 3)
- No .NET methods were profiled on web application
- ANTS Profiler code instrumentation method
- Add-in fails to load when using RunAs to start Visual Studio as another user
- Profiling unit tests using Nunit
- Can I profile Compact Framework applications?
- Profiling a SharePoint 2007 Web Part
- Profiling an assembly in the Global Assembly Cache (GAC)
- Profiling IIS web applications that need to run under the SYSTEM account
- Profiling a web application hosted in IIS on a fixed TCP port
- Profiling client-side XBAP .NET applications
- ANTS Profiler prompts for location of source code which is not your own source code
- ANTS menu remains in Visual Studio after uninstall of ANTS Profiler
- Profiling a web application needing to run as the Network Service account
- Cannot start COM+ application via Remote Desktop
- Finding the overall time taken to execute a thread
- Profiling BizTalk applications
- Profiling Microsoft Office managed-code add-ins
- The system cannot find the file specified
- Error Stopping IISAdmin profiling IIS web application on Windows XP
- Creating a global debugging symbols (PDB) directory
- Using the add-in to profile solutions containing more than one project
- Methods may be missing on multi-core systems in version 3
- ASP .NET 1.x application recycling causing incomplete results
- Application recycling causes incomplete results and other errors when profiling ASP .NET
- (version 5) Support for profiling Silverlight applications
- Couldn't open metabase error when profiling ASP .NET hosted in IIS
- Failed to coCreate Profiler on ASP .NET web application
- HTTP error 404.17 profiling ASP .NET 1.1 on IIS 7
- Performance counters missing from results
- Isolating single ASP .NET pages in ANTS Profiler results
- Missing hits for lines in the source code view
- ANTS Profiler restarts IIS
- Showing the amount of time taken for a method in one particular thread
- Please specify a valid URL message profiling ASP .NET
- Times on individual lines do not add up to method time
- Explanation of "thread blocked" methods in ANTS Profiler
- Call graph percentages do not add up exactly
- Operation could destabilize the runtime error profiling ASP .NET
- IIS ceases to work after profiling web applications
- Problems with ANTS Visual Studio integration
- ANTS Profiler has been split into two distinct programs
- Windows Installer errors 1603 and 2738 occurring during installation
- Times in source code window are greater than the times showing in the method grid or tree view
- Problems with ANTS Performance Profiler Visual Studio integration
- Profiling ClickOnce applications deployed to IIS
- Could not enable tracing due to error code 112
- AjaxControlToolkit incompatibility causing application being profiled to crash
- Could not enable tracing because SQL Express is installed
- ANTS Performance Profiler menu items not showing in Visual Studio 2010
- Profiler stopping while profiling an in-browser Silverlight application
- "No Disk" error occurring while profiling application
- IE error "Internet Explorer cannot display the webpage" when profiling a website
- Profiler failing to connect to the server when profiling web applications
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
ANTS Performance Profiler
- Activating your products
- Activating your products
- Interpreting unexpected profiling results
- Choosing a profiling mode in ANTS Performance Profiler 6
- ANTS Performance Profiler 7 release notes - version 7.xx
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using ANTS Performance Profiler