Use the profiler (-profile) to enable data collection of program execution times to identify potential application performance issues. During development, developers use the profiler directly from Developer Studio or by adding -profile to their command-line startup parameters. For more information on using the profiler from Developer Studio, see Profiler View. For applications running on testing, staging, and production systems, developers and system administrators use server-side profiling. For more information, see What is Server-Side Profiling?.

Operating system and syntax UNIX / Windows -profile options-file
Use with Maximum value Minimum value Single-user default Multi-user default
Client Session
options-file

The pathname of a file containing values used to initialize the profiler attributes. If you do not specify a filename, then the default values are used.

The Profiler attributes which are supported in a file configuration, are specified in the following table.
Option Description
-coverage Determines whether or not the profiler records information that can be used for code coverage analysis.

If -coverage is not specified, the default is no coverage.

-describe string Description generated to the output file. Same as -description string.
-description string Description generated to the output file.

If -description is not specified, the default is "Generic".

-filename outputfilename Output filename.

If -filename is not specified, the default is prof.out.

-listings [optional-directory] Indicates that you want to generate profiler listing files on the fly if they were not already generated via COMPILE ... DEBUG-LIST. Optionally, you may provide a directory name following the -listings option to indicate where the profiler listing files should be written. If the directory is not specified, the generated listing files are placed in the current working directory.

If -listings is not specified, the default is no listings.

-outfile outputfilename Output filename. Same as -filename outputfilename.
-profiling [logical] Starts measuring timings to profile performance if logical is supplied and is TRUE or YES.

If -profiling is not specified, the default is TRUE.

-statistics Enables collection of internal statistics for the ABL application. The data collected includes the number of internal procedures, external procedures, class methods, user-defined functions, temp-tables, static queries, static buffers, static datasets, r-code size, startup parameters, number of database connections, and number of tables per database during the session.

If -statistics is not specified, the default is no statistics.

CAUTION: Gathering these additional statistics can measurably slow down the AVM, so do not enable this unless you really need to see these details.
-trace-filter string Comma-separated string that uses wildcard matching for any procedure or class you want trace.

If -trace-filter is not specified, the default is no trace-filter.

CAUTION: Tracing can significantly slow down the AVM execution.
-tracing string Comma-separated string of procedure and line number pairs. A pipe (|) separates the procedure name and line number. For example, "test1|32,test2|17".

If -tracing is not specified, the default is no tracing.

CAUTION: Tracing can significantly slow down the AVM execution.
For example, to generate a debug listing with code coverage details on all files and write the output to mytest.prof, use the following options file:
options.txt
-coverage
-listings
-filename mytest.prof
On Windows, use the following command to reference the options file:
prowin -p test.p -profile C:\temp\options.txt

Notes

  • In order to generate a listing file, the source code must be accessible from the PROPATH.
  • Setting -tracing and/or -trace-filter can significantly slow down the AVM execution. Enabling tracing generates separate timing data every single time an ABL statement executes. That means that if you have a loop that executes 10,000 times, your output file will have 10,000 lines of timing data for every statement in the loop; that timing data will describe how long each execution of each statement took to run. Tracing should only be enabled if you are prepared to slow down the AVM and also prepared to use lots of disk space for your output file.
For more information about the PROFILER system handle, see PROFILER system handle.