AQTime Command Line

Applies to AQTime 8.81, last modified on January 18, 2022

AQTime uses the following command-line arguments:

<AQtime.exe> (project_name | (file_name[/s | /SearchProject] ) )
[ ([/r | /run] | [/sr:result_file_name | /SaveResults:result_file_name] | [/a:PID | /attach:PID]) [/e|/exit] ]
[/cl:command_line_parameters | /CommandLine:command_line_parameters]
[ (/silentmode | /errorandwarningmode |  /erroronlymode)]
[ /ao:output_file_name | /AdditionalOutput:output_file_name]
[ /et:Format,File_name | /ExportRes:Format,File_name ]
[ /m:"Col1,Index1,Col2,Index2" | /Merge:"Col1,Index1,Col2,Index2" ][/nonzeroexitcode]

Here the parenthesis means the group of command-line arguments. The “|” means OR, for example, “/r | /run” means you can use either /r OR /run. Square brackets mean the argument or group of arguments is optional. Below is the detailed description of AQTime’s command-line arguments:

Argument Description
project_name Loads the specified project (.aqt) in AQTime. Do not forget to enclose project_name in quotes in case the project name or path contains spaces.
file_name

If /s or /SearchProject is specified, AQTime searches for the project that matches the specified file name and if the project is found, loads it. Note that AQTime searches for the project using the “default” project name and the path specified in file_name. For instance, if you specify C:/Work/MyApp.exe as file_name, AQTime will search for the project MyApp_exe.aqt in the C:\Work folder.

Do not forget to enclose file_name in quotes in case the file name or path contains spaces.

/s, /SearchProject /s and /SearchProject are equivalent. They specify whether AQTime should search for and load the AQTime project that corresponds to the executable specified by the file_name command-line argument.
/r, /run /r and /run are equivalent. They command AQTime to start profiling upon loading the project (file) in AQTime.
If you load a project, AQTime will profile with the profiler specified in the project file (this is the profiler you used last for your project). In addition, AQTime will use the area, trigger and action settings stored in the project.
If you load a file, AQTime will profile with the Performance profiler and with default area and trigger settings (that is, no triggers and actions, All Project Modules (Routines only) and Entire .NET Code (Routines only) are enabled).
/sr:result_file_name,
/SaveResults:result_file_name
/sr and /SaveResults are equivalent. They command AQTime to save profiling results to a separate .aqr file specified by the result_file_name argument. If a file with the specified name already exists, AQTime overwrites its contents.

Do not forget to enclose result_file_name in quotes if the file name or path contains spaces.

/a:PID, /attach:PID Commands AQTime to profile using the “Attach to Process” feature. PID specifies the ID of the process to which AQTime should attach. You can learn the project ID, for example, from Windows’ Task Manager. /a and /attach are equivalent. They are ignored if /r or /run is specified.
/e, /exit /e and /exit are equivalent. They command AQTime to close automatically once the profiling has finished or if, for some reason, AQTime cannot find and load the project specified by the project_name argument. The /e (/exit) argument can be used if either /r, /run, /a or /attach is used. Otherwise, the argument is ignored.
/cl:command_line_parameters,

/CommandLine:command_line_parameters

Specifies command-line parameters of the profiled application. If you need to specify several command-line parameters, put enclose them in quotes: /cl:"Param1 Param2 Param3". If you need to specify a parameter that contains spaces, enclose this parameter in single quotes: /cl:"Param1 'Param with spaces' Param2 Param3".
/SilentMode,

/ErrorAndWarningMode,

/ErrorOnlyMode

You can use one of these arguments to specify what message boxes and dialogs AQTime will display during its work:
  • /SilentMode - If this argument is specified, AQTime will not display any dialogs. For instance, it will not display the Profiler Options dialog upon starting the profiling. In addition, it will not inform you of any errors and warnings that may occur during its work.
  • /ErrorAndWarningMode - If this argument is used, AQTime will not display dialogs, but will show error and warning messages.
  • /ErrorOnlyMode - If this argument is used, AQTime will not display any dialogs and message boxes except for the error messages.
/ao:output_file_name,
/AdditionalOutput:output_file_name
/ao and /AdditionalOutput are equivalent. They command AQTime to save information on events occurred in AQTime and in the profiled application during profiling (that is, information from the Event View panel) to a separate text file specified by the output_file_name argument. If a file with the specified name already exists, AQTime overwrites its contents.

Do not forget to enclose output_file_name in quotes if the file name or path contains spaces.

/et:Format,File_name,
/ExportRes:Format,File_name

/et and /ExportRes are equivalent. They command AQTime to export the results of the project run to the file specified by the File_name parameter.

  • Format - The format used to save the exported results. The available formats are: xml, html and txt.

  • File_name - The fully-qualified name of the file that will store the exported results.

    Do not forget to enclose File_name in quotes if the file name or path contains spaces.

For more information on the structure of the results exported to XML, see Structure of XML Results.

/m:"Col1,Index1,Col2,Index2",
/Merge:"Col1,Index1,Col2,Index2"
/m and /Merge are equivalent. They command AQTime to merge two profiling results. Each of the results to be merged is specified by the collection name and the zero-based index in this collection.
  • Col1 - The results collection that holds the first result to be merged. The possible values of this parameter are: LR, SR and MR. The values correspond to the Last Results, Saved Results and Merged Results collection, respectively.
  • Index1 - The zero-based index of the result in the collection specified by the Col1 parameter.
    Note: The result sets are indexed from the newest one to the last one. This means that the newest result set in the collection is always indexed as 0, the previous result set is indexed as 1, and so on.
  • Col2 - The results collection that holds the second result to be merged. The possible values of this parameter are: LR, SR and MR. The values correspond to the Last Results, Saved Results and Merged Results collection, respectively.
  • Index2 - The zero-based index of the result in the collection specified by the Col2 parameter.
    Note: The result sets are indexed from the newest one to the last one. This means that the newest result set in the collection is always indexed as 0, the previous result set is indexed as 1, and so on.

For more information on merging profiling results, see Merging Results.

/nonzeroexitcode
If this argument is used, AQTime will provide an exit code indicating run results. Otherwise, AQTime will always return a zero exit code. For more information on possible exit codes, see AQTime Exit Codes.

Here are some examples of running AQTime with command-line arguments:

  • Runs AQTime, loads the specified project (MyApp.aqt), starts profiling and exports the generated results to the D:\Profiling Results\Index.xml file:

    "C:\Work\SmartBear\AQtime\Bin\AQtime.exe" "C:\My App\MyApp.aqt" /r /et:xml,"D:\Profiling Results\Index.xml"
  • Runs AQTime, loads the specified project (MyApp.aqt) and starts profiling the project using the “Attach to Process” feature:

    AQtime.exe "C:\My App\MyApp.aqt" /a:1296
  • Runs AQTime, loads the specified project (MyApp.aqt), starts profiling and merges the newest item of the Last Results collection with the third item of the Stored Results collection:

    "C:\Work\SmartBear\AQtime\Bin\AQtime.exe" "C:\My App\MyApp.aqt" /r /m:"LR,0,SR,2"

As you can see, using command-line arguments you can launch AQTime, load a project in it, start profiling and close AQTime once the profiling has finished. All of this gives you the ability to integrate AQTime in automated tests of your application. Running these tests after each application build, for instance, you can easily see if changes to the application’s code caused performance bottlenecks or inefficient use of memory. The current version of AQTime cannot simulate user actions (keypresses, mouse clicks, etc.) after profiling starts. However, you can easily do this with TestComplete - a tool that was specially designed for testing Windows applications. For more information on it, see TestComplete. The use of AQTime along with TestComplete lets you significantly reduce the amount of time spent for testing and managing the application delivery process.

See Also

Automating AQTime
Working With AQTime via COM
TestComplete
AQTime Exit Codes

Highlight search results