next up previous contents index
Next: Finding Performance Bottlenecks Up: Built-in predicates Previous: Debugging and Tracing Programs   Contents   Index

Obtaining Runtime Statistics

statistics2+Key, -Value Unify system statistics determined by Key with Value. The possible keys are given in the statistics.


Table: Keys for statistics2
agc Number of atom garbage-collections performed
agc_gained Number of atoms removed
agc_time Time spent in atom garbage-collections
cputime (User) CPU time since Prolog was started in seconds
inferences Total number of passes via the call and redo ports since Prolog was started.
heap Estimated total size of the heap (see heap)
heapused Bytes heap in use by Prolog.
heaplimit Maximum size of the heap (see heap)
local Allocated size of the local stack in bytes.
localused Number of bytes in use on the local stack.
locallimit Size to which the local stack is allowed to grow
global Allocated size of the global stack in bytes.
globalused Number of bytes in use on the global stack.
globallimit Size to which the global stack is allowed to grow
trail Allocated size of the trail stack in bytes.
trailused Number of bytes in use on the trail stack.
traillimit Size to which the trail stack is allowed to grow
atoms Total number of defined atoms.
functors Total number of defined name/arity pairs.
predicates Total number of predicate definitions.
modules Total number of module definitions.
codes Total amount of byte codes in all clauses.
threads MT-version: number of active threads
threads_created MT-version: number of created threads
threads_cputime MT-version: seconds CPU time used by finished threads


statistics0 Display a table of system statistics on the current output stream. time1+Goal Execute Goal just like once1 (i.e. leaving no choice points), but print used time, number of logical inferences and the average number of lips (logical inferences per second). Note that SWI-Prolog counts the actual executed number of inferences rather than the number of passes through the call- and redo ports of the theoretical 4-port model.


next up previous contents index
Next: Finding Performance Bottlenecks Up: Built-in predicates Previous: Debugging and Tracing Programs   Contents   Index
Dr. Richard Botting 2001-12-12