3.4 Profiling: the Profile structure

3.4.3 Profiling manners

Profiling manners, which describe how the profiler should gather profiling data, are represented by the type manner. To define a manner, use the function make_manner. The function takes a record describing how to perform an execution profile, and returns a manner:

val make_manner : 
  {time : bool, 
   space : bool, 
   calls : bool, 
   copies : bool, 
   depth : int, 
   breakdown : object_kind list} -> manner

By providing values for these fields, you specify a manner in which to profile a function:

time
If true, gather time-profiling data.

space
If true, gather space-profiling data.

calls
If true, gather function-call-counting data.

copies
If true, record the number of garbage-collector copies per generation in any space profile.

depth
An integer specifying the call-depth to which callers should be recorded in multi-level time profiling. See the note on multi-level time profiling in Section 3.4.6 on page 27.

breakdown
A list of the kinds of object to break down in any space profile. Of the total amount of space allocated by a function, breakdowns show how much of that space was taken by a certain kind of object. See object_kind, page 40.


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker