3.4.9 Profile structure values

options

Type

Summary

Profiler options.

Signature

MLWORKS.Profile

Structure

MLWorks.Profile

Type

datatype options = 
  Options of
    {scan : int,
    selector : function_id -> manner}

Description

This type is used for passing options to the profiler. The profiler needs to know how often to scan the stack. It also needs a selector function, which is used to select a profiling manner with which to profile the function call passed to MLWorks.Profile.profile as f x.

scan
The interval in "user" milliseconds between scans of the stack. If 0 then no scans will occur.

By "user" milliseconds, we mean the time that is devoted solely to evaluating user code, rather than internal MLWorks operations.

The profiler may not be able to respect very small values for scan, because it relies on the underlying operating system clock. Most UNIX operating systems provide 100 ticks per second (scan ³ 10 realistic) or 60 ticks per second (scan ³ 16 realistic). The clock granularity on Windows can vary from machine to machine, but scan values similar to those for UNIX are usually fine.

selector
Selects the manner in which particular functions are to be profiled.


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker