[ library(port_profiler) | Reference Manual | Alphabetic Index ]
Create a (box model) port profile for the given Goal execution
- A callable goal (atom or compound term)
- A list of OptionName:OptionValue structures
Executes Goal and creates a (box model) port profile for this execution.
The ports are the ports as defined for the debugger's box model and
- predicate invocation
- deterministic predicate success
- predicate failure
- nondeterministic predicate success
- reentering a predicate on backtracking
- going to the next clause of a predicate
- going to an alternative within a predicate
- leaving a predicate with throw/1
- delaying a predicate
- reentering a predicate on waking
The available options are:
Note: Any choicepoints that are left behind by Goal will be cut, i.e.
port_profile/2 behaves like once/1.
- format (default:txt)
- output format, txt or html
- prints an ascii table, taking width-option into account
- prints an html table, taking border-option into account
- prints the raw results as lines of the form
[M:F/A from PM:PF/PA, Port, Count].
if the show_caller-option is on, and
[M:F/A, Port, Count].
if the show_caller-option is off. These are valid Prolog
terms which can be read back using read/2.
- border (default:0)
- table border width for html output
- output (default:default)
where to put the result: possible values are
- where File is a file name
- where Stream is an Eclipse stream identifier
- where Dir is a directory in which files with generated names will be placed
- either dir(profiler) for html format, or stream(output) otherwise
- ports (default:all)
- the atom 'all' or a list of port names
- predicates (default:all)
- the atom 'all' or 'spied_only'.
The latter means that only predicates with a spy point have their
- show_caller (default:on)
- whether to show and distinguish
predicates by their calling predicate (on or off). This is the
only option that affects data collection as well as presentation.
- show_module (default:off)
- whether to show the predicate's
definition modules in the output table (on or off)
- width (default:80)
- page width for txt output
This predicate is sensitive to its module context (tool predicate, see @/2).
library(port_profiler), library(coverage), profile : profile / 1, last_port_profile / 1