
3.4.9 Profile structure values
MLWORKS.Profile
MLWorks.Profile
datatype function_time_profile =
Function_Time_Profile of
{found: int,
top: int,
scans: int,
depth: int,
self: int,
callers: function_caller list}
function_time_profile value in the time field of the function_profile returned by the profiler. See make_manner for a discussion of how to ask for time profiling.
found
top
scans
depth
self
callers
top indicates how much time was spent in f alone, and scans how much time was spent in f and all the functions it called. The average recursion of the function is roughly found divided by scans, and depth and self are indicators of the maximum recursion of the function. These are all rough indicators because of the random element introduced by time-based sampling and because optimizations such as tail-call removal have an effect on the stack.
found would be 17.
top would be 1. (From the first scan.)
scans would be 2.
depth would be 9. (From the first scan.)
self would be 3. (From the first scan.)
function_caller, page 38
function_profile, page 35

Generated with Harlequin WebMaker