profile/[0,1,2,3] development

Synopsis

profile

profile(+Goal)

profile(+Goal,+Interval)

profile(+Goal,+Interval,+Sigtype)

Turns on the profiler and profiles the execution of Goal.

Arguments

Goal callable [MOD]
The goal to profile.
Interval integer
The hit interval in microseconds (default 10000).
Sigtype one of [with_sigprof,with_sigalrm,with_sigvtalrm]
Which signal to use (default SIGPROF).

Description

profile/0 turns the profiler on and resets all counts accumlated from previous runs of the profiler. Counts of the number of call, choice points created and redos tried are maintained by the profiler.

profile/1 performs this same action and then proceeds to execute Goal, in addition monitoring timing data. Once execution of the goal has completed, the profiling results can be displayed with show_profile_results/[0,1,2].

Note that the profiler cannot be used when in debugging mode.

This predicate is not supported in runtime systems.

See Also

noprofile/0, show_profile_results/[0,1,2]