module Stats:Utilities for maintaining timing statisticssig..end
type timerModeEnum =
| |
Disabled |
(* | Do not collect timing information | *) |
| |
SoftwareTimer |
(* | Use OCaml's Unix.time for timing information | *) |
| |
HardwareTimer |
(* | Use the Pentium's cycle counter to time code | *) |
| |
HardwareIfAvail |
(* | Use the hardware cycle counter if availible; otherwise use SoftwareTimer | *) |
val reset : timerModeEnum -> unit
You will get an exception if you pass HardwareTimer to reset and the
hardware counters are not available
exception NoPerfCount
val countCalls : bool refStats.repeattime or Stats.time for each label.
(default: false)val has_performance_counters : unit -> boolval sample_pentium_perfcount_20 : unit -> intval sample_pentium_perfcount_10 : unit -> intval time : string -> ('a -> 'b) -> 'a -> 'bval repeattime : float -> string -> ('a -> 'b) -> 'a -> 'bval print : out_channel -> string -> unitval lookupTime : string -> float
val timethis : ('a -> 'b) -> 'a -> 'bval lastTime : float ref