The Logtalk ports tool is a code profiling tool based on the extended procedure box model (using the same reflection API as the debugger tool) to count and report the number of times each port is traversed during the execution of queries. It provides valuable insight on predicate usage allowing e.g. the detection of problems that can cause poor performance.
For details on the ports tool, see https://github.com/LogtalkDotOrg/logtalk3/blob/master/tools/ports/NOTES.md
For an usage example, see https://forums.logtalk.org/viewtopic.php?f=21&t=240