This module provides some execution statistics. The predicate statistics/2 returns some key figures of the memory management and the runtime system, whereas the predicate statistics/0 displays the key figures on the standard output. The measurement of the time performance of a goal is facilitated by the predicate time/1.Example:
?- statistics.The threads managed by a thread are determined from the thread groups owned by the thread. The managed time is determined from managed threads that are already dead, whereas the snapshot time is determined from managed threads that are still alive. The CPU time is determined from summing the thread, managed and snapshot CPU time..
Max Memory 512,753,664 Bytes
Used Memory 68,568,872 Bytes
Free Memory 444,184,792 Bytes
Uptime 5,293 Millis
GC Time 12 Millis
Threads Time 1,000 Millis
Current Time 02/13/18 15:20:08
The following stats predicates are provided:
- max: The maximum memory in bytes.
- used: The currently used memory in bytes.
- free: The currently allocated but unused memory in bytes.
- uptime: The time since start-up in milliseconds.
- gctime: The time spent for garbage collection in milliseconds.
- time: The CPU time of the current thread.
- sys_time_self: The thread CPU time of the current thread.
- sys_time_managed: The managed CPU time of the current thread.
- sys_time_snapshot: The snapshot CPU time of the current threads.
- wall: The current time in milliseconds.
sys_local_clauses: The number of thread local clauses.
sys_time_self: The thread CPU time.
sys_time_managed: The managed CPU time.