PROFILER

Top  Previous  Next

 

The PROFILER command handles all actions relating to the application event profiler.

 

 

Format

 

PROFILER ON {USER n} {mode...}Start logging

 

PROFILER OFF {USER n}Stop logging and dump data to disk

 

PROFILER {DISPLAY}{USER n}Display logged data. The DISPLAY keyword is optional.

 

 

When using the ON or OFF keywords, if the USER qualifier is absent, it defaults to the user performing the command. For the DISPLAY mode, if no user number is specified in the command, a list of available profiles is displayed.

 

 

The PROFILER ON command starts collection of event log data. The optional mode qualifier specifies the event type(s) to be recorded. It may be any combination of the following and defaults to recording all events:

CALLCalls to QMBasic subroutines
OPENQMBasic OPEN and OPENPATH statements
READQMBasic READ statements, including locking variants and MATREAD
WRITEQMBasic WRITE statements
DELETEQMBasic DELETE statements
OPENSEQQMBasic OPENSEQ statements
READSEQQMBasic READSEQ statements
WRITESEQQMBasic WRITESEQ statements
EXECUTEQMBasic EXECUTE statements. Only the first 32 characters of the command are logged.
OBJECTCalls to public subroutines/functions in a class module.

 

 

The PROFILER OFF command terminates logging and writes the data to a file named profile.uuu in the QM temporary directory where uuu is the user number. Note that although this appears to be a text file, it may contain both field marks and newline sequences and hence may not behave as expected in user written analysis tools. No assumptions should be made regarding the content of the log file as it may change between QM releases.

 

The PROFILER DISPLAY command displays the collected data. The initial display shows the event types that appear in the logged data together with the number of occurrences of each event type. The cursor down/up keys may then be used to select an event type. The return key will drill down into the data, displaying the qualifying data associated with each logged event of the selected type. In the same way, it is then possible to select and drill down into a list of programs that logged the selected event type and qualifying data combination. A final step, only available if the program was compiled in debug mode, allows the user to drill down to a list of line numbers within the selected program at which the logged event occurred. For non-debug mode programs, the line number will appear as zero. If there are no line numbers recorded for any displayed program, a message is displayed instead of the final screen. At each level, the backspace key can be used to return to the previous level.

 

 

See also:

Application Profiling, FSTAT, FSTAT.USER