sig
type 'a fmt = Stdlib.Format.formatter -> 'a -> unit
type bench
module Attr :
sig
type t
val empty : Unmark.Attr.t
val is_empty : Unmark.Attr.t -> bool
val key : 'a Unmark.fmt -> name:string -> 'a -> Unmark.Attr.t
val ( ++ ) : Unmark.Attr.t -> Unmark.Attr.t -> Unmark.Attr.t
val pp : Unmark.Attr.t Unmark.fmt
end
val bench : ?attr:Unmark.Attr.t -> string -> (unit -> 'a) -> Unmark.bench
val group : string -> Unmark.bench list -> Unmark.bench
val group_f :
init:(unit -> 'a) ->
fini:('a -> unit) -> string -> ('a -> Unmark.bench list) -> Unmark.bench
val log : Logs.src
module Measurement :
sig
module Probe :
sig
type counter
val ctr :
?unit:string ->
?desc:string -> string -> Unmark.Measurement.Probe.counter
val name : Unmark.Measurement.Probe.counter -> string
val desc : Unmark.Measurement.Probe.counter -> string
val unit : Unmark.Measurement.Probe.counter -> string option
val pp_ctr : Unmark.Measurement.Probe.counter Unmark.fmt
type probe
val probe :
counters:Unmark.Measurement.Probe.counter list ->
(float array -> int -> unit) -> Unmark.Measurement.Probe.probe
val nothing : Unmark.Measurement.Probe.probe
val ( ++ ) :
Unmark.Measurement.Probe.probe ->
Unmark.Measurement.Probe.probe -> Unmark.Measurement.Probe.probe
val counters :
Unmark.Measurement.Probe.probe ->
Unmark.Measurement.Probe.counter list
val pp : Unmark.Measurement.Probe.probe Unmark.fmt
val gc_q_stat : Unmark.Measurement.Probe.probe
val gc_counters : Unmark.Measurement.Probe.probe
val rdtsc : Unmark.Measurement.Probe.probe
end
type runnable
val runnable : (unit -> 'a) -> Unmark.Measurement.runnable
type sample = float array
val sample :
probe:Unmark.Measurement.Probe.probe ->
iters:int -> Unmark.Measurement.runnable -> Unmark.Measurement.sample
val measure :
?probe:Unmark.Measurement.Probe.probe ->
?min_t:float ->
?min_s:int ->
Unmark.Measurement.runnable -> Unmark.Measurement.sample list
val warmup : ?seconds:float -> unit -> unit
val core_counters : Unmark.Measurement.Probe.counter list
end
module Benchmarks :
sig
type name = string list * string
type query = string list
val matches :
?group:bool ->
q:Unmark.Benchmarks.query -> Unmark.Benchmarks.name -> bool
type run = {
suite : string;
note : string;
time : float;
counters : (string * string option) list;
benchmarks :
(Unmark.Benchmarks.name * Unmark.Attr.t *
Unmark.Measurement.sample list)
list;
}
val run :
?probe:Unmark.Measurement.Probe.probe ->
?min_t:float ->
?min_s:int ->
?q:Unmark.Benchmarks.query ->
?note:string ->
suite:string -> Unmark.bench list -> Unmark.Benchmarks.run
module Run :
sig
val filter :
?q:Unmark.Benchmarks.query ->
Unmark.Benchmarks.run -> Unmark.Benchmarks.run
val add_json : Stdlib.Buffer.t -> Unmark.Benchmarks.run -> unit
val of_json :
string ->
(Unmark.Benchmarks.run * string, [ `Msg of string ])
Stdlib.result
end
type 'a thunk
val fold :
bench:(Unmark.Benchmarks.name ->
Unmark.Attr.t -> Unmark.Measurement.runnable -> 'r) ->
group:(Unmark.Benchmarks.name ->
'r list Unmark.Benchmarks.thunk -> 'r) ->
suite:('r list -> 'p) -> Unmark.bench list -> 'p
val eval : 'a Unmark.Benchmarks.thunk -> 'a
val ( %% ) :
('a -> 'b) ->
'a Unmark.Benchmarks.thunk -> 'b Unmark.Benchmarks.thunk
end
module Estimate :
sig
type estimator = float array -> float array -> Unmark.Estimate.e
and e = {
a : float;
b : float;
r2 : float;
bounds : (float * float) Stdlib.Lazy.t;
}
val pp_e : Unmark.Estimate.e Unmark.fmt
val validity : Unmark.Estimate.e -> [ `Bad | `Good | `Meh | `Undef ]
val ols : Unmark.Estimate.estimator
val tse : Unmark.Estimate.estimator
end
end