• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.53 library(statistics): Get information about resource usage
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(statistics): Get information about resource usage
          • statistics/0
          • statistics/1
          • thread_statistics/2
          • time/1
          • call_time/2
          • call_time/3
    • Packages
Availability::- use_module(library(statistics)).(can be autoloaded)
Source[nondet]time(:Goal)
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.
ClioPatria (version V3.1.1-51-ga0b30a5)