Module Landmark_threads

Protects landmarks against concurrency.

include module type of Landmark with type Landmark.landmark = Landmark.landmark and type Landmark.sampler = Landmark.sampler and type Landmark.counter = Landmark.counter
module Graph = Landmark.Graph
external clock : unit -> Stdlib.Int64.t = "caml_highres_clock"
exception LandmarkFailure of string
type landmark = Landmark.landmark
val register : ?⁠location:string -> string -> landmark
val enter : landmark -> unit
val exit : landmark -> unit
val wrap : landmark -> ('a -> 'b) -> 'a -> 'b
val unsafe_wrap : landmark -> ('a -> 'b) -> 'a -> 'b
type counter = Landmark.counter
val register_counter : string -> counter
val increment : ?⁠times:int -> counter -> unit
type sampler = Landmark.sampler
val register_sampler : string -> sampler
val sample : sampler -> float -> unit
val profiling : unit -> bool
type profile_output =
| Silent
| Temporary of string option
| Channel of Stdlib.out_channel
type textual_option = {
threshold : float;
}
type profile_format =
| JSON
| Textual of textual_option
type profiling_options = {
debug : bool;
allocated_bytes : bool;
sys_time : bool;
recursive : bool;
output : profile_output;
format : profile_format;
}
val default_options : profiling_options
val set_profiling_options : profiling_options -> unit
val profiling_options : unit -> profiling_options
val start_profiling : ?⁠profiling_options:profiling_options -> unit -> unit
val stop_profiling : unit -> unit
val reset : unit -> unit
val export : ?⁠label:string -> unit -> Graph.graph
val export_and_reset : ?⁠label:string -> unit -> Graph.graph
val merge : Graph.graph -> unit
val push_profiling_state : unit -> unit
val pop_profiling_state : unit -> unit
external raise : exn -> 'a = "%raise"