Returns the results of the last profiled execution.
Returns profiling information accumulated from the last call to
The By argument specifies the display mode, which determines how
the list is sorted and what the Total argument returns.
The Num argument determines the maximum length of the Results
list. This list is always sorted in descending order so that the top Num
predicates are included in the list.
Results is a list of terms of the form
where Name,Ncalls,Nchpts,Nredos,Time give call, choice point,
redo counts and the execution time spent in milliseconds, and
Callers is a list of
terms, where Time in this case is the percentage of time attributed
to this caller, Calls is the number of calls made from this caller
and Name, ClauseNo, CallNo locate precisely the actual caller.
If the display mode is
by_time then Total is the total
execution time in milliseconds. If the display mode is
by_redos then Total returns
the total number of calls, choice points or redos respectively.
This predicate is not supported in runtime systems.
| ?- get_profile_results(by_time,3,List,Total). List = [proc(user:setof/3,227,0,0,1980, [calledby(61,152,user:satisfy/1,6,1), calledby(20,27,user:satisfy/1,7,1), calledby(18,48,user:seto/3,1,1)]), proc(user:satisfy/1,35738,36782,14112,260, [calledby(69,13857,user:satisfy/1,1,2), calledby(15,12137,user:satisfy/1,2,1)]), proc(user:write/1,2814,0,0,240, [calledby(33,481,user:reply/1,3,1), calledby(25,608,user:replies/1,3,1), calledby(16,562,user:out/1,2,1), calledby(8,203,user:reply/1,2,5), calledby(8,34,user:replies/1,2,3)])], Total = 6040 [profile]