/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
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl -- Extensible arithmetic
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl -- Modify solution sequences
      • ordsets.pl
      • random.pl
      • 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
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl -- Lazy list handling
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • rbtrees.pl
      • dif.pl
      • charsio.pl
      • prolog_stack.pl
      • edinburgh.pl -- Some traditional Edinburgh predicates
      • 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
      • intercept.pl
      • listing.pl -- List programs and pretty print clauses
      • statistics.pl -- Get information about resource usage
        • statistics/0
        • statistics/1
        • thread_statistics/2
        • time/1
        • call_time/2
        • call_time/3
      • terms.pl
      • base32.pl
      • codesio.pl
      • coinduction.pl
      • date.pl
      • heaps.pl
      • utf8.pl
      • when.pl
      • backcomp.pl
      • writef.pl
      • zip.pl -- Access resource ZIP archives
      • prolog_autoload.pl
      • check.pl -- Consistency checking
      • strings.pl -- String utilities
      • ctypes.pl -- Character code classification
      • quintus.pl
      • prolog_codewalk.pl -- Prolog code walker
 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.