profile(:Goal,
+Options)Execute Goal just like once/1.
Collect profiling statistics according to Options and call show_profile/1
with Options. The default collects CPU profiling and opens a
graphical interface when provided, printing theāplain' time usage
of the top 25 predicates as a ballback. Options are described below.
Remaining options are passed to show_profile/1.
- time(+Which)
- If Which is
cpu
(default), collect CPU timing
statistics. If wall
, collect wall time statistics based on
a 5 millisecond sampling rate. Wall time statistics can be useful if Goal
calls blocking system calls.
profile(:Goal)
profile(:Goal,
+Options)Run Goal under the execution profiler. Defined options are:
- time(Which)
- Profile
cpu
or wall
time. The default is CPU
time.
- top(N)
- When generating a textual report, show the top N predicates.
- cumulative(Bool)
- If
true
(default false
), show cumulative
output in a textual report.