- last_port_profile(++Options)
- Output another port profile for the most recently profiled goal
- port_profile(?)
- No description available
- port_profile(+Goal, ++Options)
- Create a (box model) port profile for the given Goal execution
This is a performance analysis tool based on counting of events during program execution. The events that are counted are defined in terms of the 'box model' of execution (the same model that the debugger uses). In this box model, predicates are entered though call, redo or resume ports, and exited through exit, fail or leave ports. In addition, other interesting events are indicated by ports as well (next, else, delay).
The usage is as follows:
?- compile(queen).
?- lib(port_profiler).
?- port_profile(queen([1,2,3,4],Out), []).
This will print the results in a table.
PREDICATE CALLER call exit fail *exit redo
store_set /3 nodiag /3 106 106 . . .
- /3 nodiag /3 46 46 . . .
=\= /2 nodiag /3 46 45 1 . .
qperm /2 qperm /2 30 28 . 16 14
qdelete /4 qperm /2 20 18 . 12 10
nodiag /3 nodiag /3 17 14 3 . .
nodiag /3 safe /1 17 7 10 . .
+ /3 nodiag /3 17 17 . . .
qdelete /4 qdelete /4 10 9 . 3 2
qperm /2 queen /2 1 . . 11 10
safe /1 queen /2 11 1 10 . .
safe /1 safe /1 7 4 3 . .
queen /2 trace_body /2 1 . . 1 .
The port counts give information about
Other options allow output in different formats, e.g. as an html file, with a subset or different order of the ports, or with module information. For details, see the description of port_profile/2.
Related, but different tools are: