Templates
Description
statistics displays statistics about memory usage and run times.
statistics(Key, Value) unifies Value with the current value of the statistics key Key. Value a list of two elements. Times are in milliseconds, sizes of areas in bytes.
Key | Description | Value |
user_time | user CPU time | [SinceStart, SinceLast] |
system_time | system CPU time | [SinceStart, SinceLast] |
cpu_time | total CPU time (user + system) | [SinceStart, SinceLast] |
real_time | absolute time | [SinceStart, SinceLast] |
local_stack | local stack sizes (control, environments, choices) | [UsedSize, FreeSize] |
global_stack | global stack sizes (compound terms) | [UsedSize, FreeSize] |
trail_stack | trail stack sizes (variable bindings to undo) | [UsedSize, FreeSize] |
cstr_stack | constraint trail sizes (finite domain constraints) | [UsedSize, FreeSize] |
atoms | atom table | [NumberOfAtoms, FreeNumberOfAtoms] |
Note that the key runtime is recognized as user_time for compatibility purpose.
Errors
Key is neither a variable nor a valid key | domain_error(statistics_key, Key) | |
Value is neither a variable nor a list of two elements | domain_error(statistics_value, Value) | |
Value is a list of two elements and an element E is neither a variable nor an integer | type_error(integer, E) | |
Portability
GNU Prolog predicates.
Templates
Description
user_time(Time) unifies Time with the user CPU time elapsed since the start of Prolog.
system_time(Time) unifies Time with the system CPU time elapsed since the start of Prolog.
cpu_time(Time) unifies Time with the CPU time (user + system) elapsed since the start of Prolog.
real_time(Time) unifies Time with the absolute time elapsed since the start of Prolog.
Errors
Time is neither a variable nor an integer | type_error(integer, Time) | |
Portability
GNU Prolog predicates.