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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • 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 -- 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
      • utf8.pl
      • dialect.pl
      • system.pl
      • terms.pl
      • date.pl
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl -- Manage Prolog break-points
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl
      • varnumbers.pl
      • pio.pl -- Pure I/O
      • thread.pl
      • nb_set.pl
      • edit.pl
      • backcomp.pl
      • strings.pl
      • base32.pl
      • charsio.pl
      • codesio.pl
      • coinduction.pl -- Co-Logic Programming
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • increval.pl
      • tables.pl
      • threadutil.pl -- Interactive thread utilities
      • ansi_term.pl
      • hashtable.pl
      • macros.pl
      • intercept.pl
      • prolog_metainference.pl
      • prolog_codewalk.pl -- Prolog code walker
      • fastrw.pl
      • prolog_coverage.pl
      • prolog_debug.pl
      • prolog_profile.pl -- Execution profiler
        • profile/1
        • profile/2
        • show_profile/1
        • profile_data/1
        • profile_procedure_data/2
      • check.pl
      • prolog_autoload.pl
      • ctypes.pl -- Character code classification
      • writef.pl
      • prolog_versions.pl
      • explain.pl
      • listing.pl -- List programs and pretty print clauses
      • zip.pl
      • tty.pl
      • prolog_trace.pl
      • prolog_wrap.pl
      • make.pl -- Reload modified source files
      • files.pl
 profile(: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. Default is defined by the Prolog flag profile_sample_rate, which defaults to 200.
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. Default is defined by the Prolog flag profile_ports, which defaults to true.
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.