Recording how many times each source line runs
To record of how many times each line of your code was executed:
- Use a log file if you want to keep a permanent record of the results. To learn how to create a log file, see Creating the log file.
- Issue the command:
After you have entered theSET FREQUENCY ON;
SET FREQUENCY ON
command, your Source window is updated to show the current frequency count. Remember that this command starts the statistic gathering to display the actual count, so if your application has already executed a section of code, the data for these executed statements will not be available.If you want statement counts for the entire program, issue:
which lists the number of times each statement is run. When you quit, the results are written to the Log file. You can issue theGO ; LIST FREQUENCY * ;
LIST FREQUENCY *
at any time, but it will only display the frequency count for the currently active compile unit.
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- Creating the log file