
prolog_profile.pl -- Execution profiler
This module provides a simple frontend on the execution profiler with a
hook to the GUI visualiser for profiling results defined in
library(swi/pce_profile).
profile(:Goal)
profile(:Goal, +Options)once(Goal) under the execution profiler. If the (xpce) GUI is
enabled this predicate is hooked by library(swi/pce_profile) and
results are presented in a gui that enables navigating the call tree
and jump to predicate implementations. Without the GUI, a simple
textual report is generated. Defined options are:
cpu or wall time. The default is CPU time.profile_sample_rate,
which defaults to 200.true (all ports), false (call
port only) or classic (all with some errors).
Accomodates space/accuracy tradeoff building call tree.
Default is defined by the Prolog flag profile_ports,
which defaults to true.true (default false), show cumulative output in
a textual report.
show_profile(+Options)true (default false), show cumulative output in
a textual report.
profile_data(-Data) is dettrue, false or classiclist_of(Relative)list_of(Relative)Relative is a term of the shape below that represents a caller or callee. Future versions are likely to use a dict instead.
node(PredicateIndicator, CycleID, Ticks, TicksSiblings,
Calls, Redos, Exits)
prof_statistics(-Node) is det[private]
profile_procedure_data(?Pred, -Data:dict) is nondetnodes key.
value(+Key, +NodeData, -Value)[private]The following predicates are exported, but not or incorrectly documented.
profile(Arg1, Arg2)