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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
      • lists.pl
      • broadcast.pl -- Event service
      • shlib.pl
      • option.pl
      • thread_pool.pl -- Resource bounded thread management
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl -- Manage operators
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl -- Random numbers
      • base64.pl
      • aggregate.pl
      • yall.pl
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl
      • atom.pl
      • modules.pl -- Module utility predicates
      • occurs.pl -- Finding and counting sub-terms
      • 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 -- The dif/2 constraint
      • charsio.pl
      • prolog_stack.pl -- Examine the Prolog stack
      • 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 -- Utilities for numbered terms
      • backcomp.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
      • thread.pl -- High level thread primitives
      • strings.pl
      • prolog_coverage.pl -- Coverage analysis tool
      • portray_text.pl
      • oset.pl
      • listing.pl
      • prolog_versions.pl
      • tables.pl
      • edit.pl
      • macros.pl -- Macro expansion
      • prolog_trace.pl
      • prolog_autoload.pl
      • check.pl
      • prolog_codewalk.pl -- Prolog code walker
      • ansi_term.pl
      • optparse.pl -- command line parsing
      • make.pl
      • explain.pl
      • nb_set.pl -- Non-backtrackable sets
      • prolog_wrap.pl
      • fastrw.pl
      • increval.pl
      • ctypes.pl
      • exceptions.pl
      • persistency.pl
      • prolog_jiti.pl
      • shell.pl
      • quintus.pl
      • zip.pl
      • prolog_history.pl
      • intercept.pl
      • writef.pl -- Old-style formatted write
      • threadutil.pl -- Interactive thread utilities
      • prolog_debug.pl -- User level debugging tools
 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.