Module Profile

Compiler performance recording

Warning: this module is unstable and part of compiler-libs.

type file = string
val reset : unit -> unit

erase all recorded profile information

val record_call : ?⁠accumulate:bool -> string -> (unit -> 'a) -> 'a

record_call pass f calls f and records its profile information.

val record : ?⁠accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b

record pass f arg records the profile information of f arg

type column = [
| `Time
| `Alloc
| `Top_heap
| `Abs_top_heap
]
val print : Stdlib.Format.formatter -> column list -> unit

Prints the selected recorded profiling information to the formatter.

val options_doc : string
val all_columns : column list
val generate : string
val transl : string
val typing : string