
statistics.pl -- Get information about resource usageThis library provides predicates to obtain information about resource usage by your program. The predicates of this library are for human use at the toplevel: information is printed. All predicates obtain their information using public low-level primitives. These primitives can be use to obtain selective statistics during execution.
statistics is det
statistics(-Stats:dict) is det
thread_statistics(?Thread, -Stats:dict) is nondet
time(:Goal) is nondetNote that is no portable way to get thread-specific CPU time. SWI-Prolog has implementations for Linux, Windows and MacOS. The automatic detection may work on some other operating systems.
call_time(:Goal, -Time:dict)
call_time(:Goal, -Time:dict, -Result)call_time/2 is defined as below. Note that for call_time/2 the time is only available if Goal succeeds.
call_time(Goal, Time) :-
call_time(Goal, Time, Result),
call(Result).
The following predicates are exported, but not or incorrectly documented.
call_time(Arg1, Arg2, Arg3)