Section "statistics"
The Dogelog player allows querying and updating various
parameters of its own environment or the host language
environment. The predicate current_prolog_flag/2 allows reading a
couple of Prolog flags. There is no predicate yet to change a
Prolog flag. The convenience time/1 will call a given goal and
show differential statistics on the standard output.
The following statistics predicates are provided:
- current_prolog_flag(K, V): [ISO 8.17.2]
- The predicate succeeds for the value V of the flag K. The
following flags are available:
argv: The script arguments.
sys_locale: The current locale.
base_url: The current working directory.
stage: The current stage.
partition: The current partition.
single_quotes: The interpretation of single quoted tokens, read
only.
double_quotes: The interpretation of double quoted tokens, read
only.
back_quotes: The interpretation of back quoted tokens, read
only.
dialect: The Prolog language dialect, read only.
version: The release integer, read only.
version_data: The compound with dialect and release parts, read
only.
strict_iso: The strict iso compatibility mode, read only.
max_code: The maximum character code, read only.
max_arity: The maximum arity of a compound, read only.
async_mode: The current async mode, read only.
allow_yield: The current yield permission, read only.
system_url: The system library path, read only.
foreign_ext: The native libraries file name extension, read
only.
host_info: The host programming language string, read only.
mach_info: The machine architecture and operating system string,
read only.
- statistics(K, V):
- The predicate succeeds for the value V of the flag K. The
following flags are available:
- time: The elapsed real time.
- wall: The wall clock time.
- gctime: The garbage collection time.
- calls: The call count.
- used: The used memory, or 0 if not available.
- garbage_collect:
- The built-in succeeds in attempting a garbage colection.
Kommentare