module Unmark_cli:sig..end
Unmark CLI runner.
Functions in this module consume benchmarks and turn them into ready-to-run executables.
359b80f — homepage
val main : ?probe:Unmark.Measurement.Probe.probe ->
?min_t:float ->
?min_s:int ->
?def_filter:Unmark.Benchmarks.query -> string -> Unmark.bench list -> unitBenchmark entry point.
main suite benchmarks implements the benchmark suite named suite, which
consists of benchmarks benchmarks.
probe is the measurement probe.
Default Unmark_cli.probe.
min_t, min_s default per-benchmark minimum time and samples, which can
be overridden from the command line. Default 1. and 10.
def_filter is a query applied to
benchmarks, which can be overridden from the command line. Default [].
This invocation will:
probe on (potentially a subset of)
benchmarks;For more information about the behavior of main, compile it into an
executable and invoke the executable with --help.
val main_ext : ?probe:Unmark.Measurement.Probe.probe ->
?min_t:float ->
?min_s:int ->
?def_filter:Unmark.Benchmarks.query ->
arg:'a Cmdliner.Term.t -> string -> ('a -> Unmark.bench list) -> unitEntry point with a hook for command-line arguments.
main_p ~arg suite f is main suite (f p), where p is obtained by
evaluating the Cmdliner term arg.
val probe : Unmark.Measurement.Probe.probeDefault measurement probe.
shebang.ml:
let f () = ...
let o () = ...
let () = Unmark_cli.main "shebang" Unmark.[bench "eff" f; bench "ohh" o]
$ ocamlfind ocamlopt -linkpkg -package unmark.cli shebang.ml -o shebang
$ ./shebang --help