/usr/local/lib/swipl/library/statistics.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl -- Event service
      • shlib.pl -- Utility library for loading foreign objects (DLLs, shared objects)
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl -- Extensible arithmetic
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl -- Base64 encoding and decoding
      • aggregate.pl
      • yall.pl
      • sandbox.pl -- Sandboxed Prolog code
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • rbtrees.pl
      • dif.pl
      • charsio.pl
      • prolog_stack.pl
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • dialect.pl
      • prolog_code.pl
      • sort.pl
      • iostream.pl -- Utilities to deal with streams
      • dicts.pl
      • varnumbers.pl
      • base32.pl
      • codesio.pl
      • coinduction.pl
      • date.pl
      • heaps.pl
      • statistics.pl -- Get information about resource usage
        • statistics/0
        • statistics/1
        • thread_statistics/2
        • time/1
        • call_time/2
        • call_time/3
      • terms.pl -- Term manipulation
      • utf8.pl -- UTF-8 encoding/decoding on lists of character codes.
      • when.pl
      • backcomp.pl
      • prolog_history.pl
      • increval.pl
      • tables.pl
      • thread.pl
      • prolog_coverage.pl
      • strings.pl
      • exceptions.pl
      • edit.pl
      • make.pl -- Reload modified source files
      • ctypes.pl
      • optparse.pl
      • quintus.pl -- Quintus compatibility
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • prolog_codewalk.pl
      • prolog_metainference.pl
      • shell.pl -- Elementary shell commands
      • prolog_profile.pl -- Execution profiler
      • explain.pl -- Describe Prolog Terms
      • macros.pl
      • help.pl
      • persistency.pl
      • nb_set.pl
      • rwlocks.pl
      • threadutil.pl -- Interactive thread utilities
      • writef.pl
      • check.pl
      • files.pl
      • portray_text.pl
      • prolog_debug.pl -- User level debugging tools
      • intercept.pl
      • prolog_jiti.pl
      • fastrw.pl
      • listing.pl
      • prolog_trace.pl
      • zip.pl
 time(:Goal) is nondet
Execute Goal, reporting statistics to the user. If Goal succeeds non-deterministically, retrying reports the statistics for providing the next answer.

Note 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.

See also
- statistics/2 for obtaining statistics in your program and understanding the reported values.
- call_time/2, call_time/3 to obtain the timing in a dict.
bug
- Inference statistics are often a few off.