| Did you know ... | Search Documentation: |
| library(prolog_profile): 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).
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.true, do not sample, but read the clock each time
execution moves to another node of the call tree. This gives exact wall
times, also for short running goals. For CPU time, the thread's CPU time
is read once per sample period (see
sample_rate(Rate)) and after each long interval, where the
thread may have been off the CPU. If auto, use exact timing
if reading the clock is cheap and, for CPU time, the thread CPU clock is
precise. This is typically not the case in virtual machines. Otherwise
use sampling. Default is defined by the Prolog flag profile_exact,
which defaults to
auto.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.library(test_cover).true (default false), show cumulative
output in a textual report.summary:Dict
exact
is true, the number of times execution moved to another
node of the call tree.true, false or classiccpu or wall, the time
that was profiled.exact(true)predicate:PredicateIndicatorticks_self:Countticks_siblings:Countcall:Countredo:Countexit:Countcallers:list_of(Relative)callees: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)
nodes key.