The execution profiler counts the number of times that each predicate is called during execution. This profiler is helpful for identifying the portion of predicates that are most frequently executed.
In order to gauge the execution of a program, follow the following steps:
- Compile the program with gauging calls and predicates inserted. In order to do so, either set the Prolog flag compiling to profilecode before compiling
or use profile_consult(filename) to load the source code.
Initialize the counters.
- Execute a goal.
Report the results.