MLton 20051202

MLtonRusage

Home Index

    signature MLTON_RUSAGE =
       sig
          type t = {utime: Time.time, (* user time *)
                    stime: Time.time} (* system time *)

          val measureGC: bool -> unit
          val rusage: unit -> {children: t, gc: t, self: t}
       end

- `type t`

corresponds to a subset of the C `struct rusage`.

- `measureGC b`

controls whether garbage collection time is measured during program execution. This affects the behavior of both `rusage` and `Timer.checkCPUTimes`. Note that garbage collection time is always measured when either `gc-messages` or `gc-summary` is given as a runtime system option.

- `rusage ()`

corresponds to the C `getrusage` function. It returns the resource usage of the exited children, the garbage collector, and the process itself. The process time (`self`) includes the gc time.

Last edited on 2005-12-01 22:56:24 by StephenWeeks.