4.5 Profiling: the Profile structure

profile

Function

Structure

Shell.Profile

Type

val profile: ('a -> 'b) -> 'a -> 'b

Syntax

profile f x -> values

Arguments

f
An ML function.

x
Arguments to apply f to.

Values

values
The values returned by f x.

Description

Produces an execution profile of f x, invoking the GUI profiler tool on that profile. Space and time profiling are both performed.

To perform the profiling this function calls MLWorks.Profile.profile with a stack-scan frequency of 10 milliseconds and the following selector function:

selector = fn _ => manner

Where manner was constructed by passing the following record to MLWorks.Profile.make_manner:

{ time = true,
  space = true, 
  calls = false, 
  copies = false, 
  depth = 0, 
  breakdown = [] }

See the MLWorks.Profile structure for more details of profiling. See the MLWorks User Guide for details of the GUI profiler tool.

If you are using MLWorks in TTY mode, this function prints the message:

Graphical profiler not available in TTY Listener


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker