• 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

4.42.1 library(prolog_profile): Execution profiler
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Execution profiling
          • library(prolog_profile): Execution profiler
            • profile/1
            • profile/2
            • show_profile/1
            • profile_data/1
            • profile_procedure_data/2
    • Packages
Availability::- use_module(library(prolog_profile)).(can be autoloaded)
Sourceprofile(:Goal)
profile(:Goal, +Options)
Run once(Goal) under the execution profiler. If the (xpce) GUI is enabled this predicate is hooked by library(swi/pce_profile) and results are presented in a gui that enables navigating the call tree and jump to predicate implementations. Without the GUI, a simple textual report is generated. Defined options are:
time(Which)
Profile cpu or wall time. The default is CPU time.
sample_rate(Rate)
Samples per second, any numeric value between 1 and 1000
ports(Bool)
Specifies ports counted - true (all ports), false (call port only) or classic (all with some errors). Accomodates space/accuracy tradeoff building call tree.
top(N)
When generating a textual report, show the top N predicates.
cumulative(Bool)
If true (default false), show cumulative output in a textual report.
See also
show_coverage/2 from library(test_cover).
To be done
The textual input reflects only part of the information.
ClioPatria (version V3.1.1-51-ga0b30a5)