module Probe:sig..end
Probe construction and manipulation.
type counter
Individual measured quantity.
val ctr : ?unit:string -> ?desc:string -> string -> counterctr ?unit ?desc name is a description of counter named name.
unit is the counter's measurement unit. When absent, a simple count is
assumed.
desc is a human-readable description.
val name : counter -> string
val desc : counter -> string
val unit : counter -> string option
val pp_ctr : counter Unmark.fmtpp_ctr ppf c pretty-prints c on ppf.
type probe
Probes perform the actual measurements, producing a set of counters.
val probe : counters:counter list ->
(float array -> int -> unit) -> probeprobe ~counters f is a probe p that collects counters counters
using the function f.
f is invoked as f arr i and must write the values of individual
counters into arr.(i) .. arr.(i + length counters - 1).
counters declares both the number and the order of counters that p
measures.
val nothing : probenothing is the probe that measures nothing.
val (++) : probe ->
probe -> probep1 ++ p2 the probe that measures both the counters in p1 and
p2.
val counters : probe -> counter listcounters p are the counters that p measures.
val pp : probe Unmark.fmtpp ppf p pretty-prints p on ppf.
val gc_q_stat : probeA probe for the GC subsystem, using Gc.quick_stat.
Counters:
min - words allocated on the minor heap (Gc.minor_words);prom - words promoted to the major heap (Gc.promoted_words);maj - words allocated directly on the major heap
(Gc.major_words - Gc.promoted_words);gc_min - number of minor collections (Gc.minor_collections); andgc_maj - number of major collections (Gc.major_collections).val gc_counters : probeA probe for the GC subsystem, using Gc.counters.
Subset of gc_q_stat.
val rdtsc : probeReads the timestamp counter, using x86 RDTSC instruction.
Produces the counter tsc.