Profiler

The Profiler is a tool built in the runtime system that generates a report about where the program spends time, and which function calls which function. The Profiler can help to identify areas in the program that are slower than expected.

Select the configuration node and select Debug > Execute with Profiler to start the Profiler. After the program finishes executing, the Profiler information is displayed in the Output tab.

The flat profile contains a list of the functions called while the programs was running.

Tip:

Runtime system internal function names start with the rts_ prefix. For example, the rts_display() function implements the DISPLAY instruction. Showing these internal functions in the profiler output is useful to analyse the code. Usually rts_* functions appear at the top of the flat profile list, because most of the processing time is spend in these runtime functions (for example to execute SQL statements). To improve your code, spot the first user function that appears in the flat profile list, and check the %self number: This is where user code can be improved.

Table 1. Flat profile columns
Column Name Description
count Counts the number of calls for this function
%total Percentage of execution time spent in this function. Includes time spent in subroutines called from this function.
%child Percentage of execution time spent in functions called from this function.
%self Percentage of execution time spent in this function excluding the time spent in subroutines called from this function.
name Function name

100% represents the total processing time. The time spent waiting for user interaction is ignored.

The profiler is a tool built into the runtime system. For further information on the profiler and how it works, see the Genero Business Development Language User Guide.