
3 The MLWorks Pervasive Library
Profile structure provides a programmatic interface to the MLWorks profiler. Because this programmatic interface is richer than that provided by the GUI environment's profiler tool, you may want to use it in preference to that tool. There are three kinds of profiling available: time profiling, space profiling, and call-counting. You can also specify the frequency with which the profiler should scan the stack, in milliseconds.
The profiler supports the notion of a profiling manner, which is a convenient way of specifying the kind of information the profiler should gather. A manner might specify that only call-counting should be done, and that the number of garbage collections that occurred during the execution of the function should be recorded.
When the function call is complete, the profiler returns the results of the call and the results of profiling.
Note: The profiler interface contains some details pertaining to cost-centre profiling. That style of profiling may be implemented in a future release.
The following sections explain the use of the profiler in more detail. The example code here does not qualify identifiers with an MLWorks.Profile prefix for the sake of brevity; you should add this prefix yourself, or use local open MLWorks.Profile in ... end, in order to run these examples.

Generated with Harlequin WebMaker