Module Core_bench.Bench
module Test : sig ... end
Test.t
are benchmarked by calls to bench.
module Variable : sig ... end
Variable.t
s represent variables than can be used as predictors or the responder when specifying a regression.
module Quota : sig ... end
A quota can be specified as an amount of wall time, or a number of times to run the function.
module Run_config : sig ... end
Run_config.t
specifies how a benchmark should be run.
module Display_config : sig ... end
Display_config.t
specifies how the output tables should be formatted.
module Analysis_config : sig ... end
Each
Analysis_config.t
specifies a regression run byCore_bench
. This module also provides several typical regressions that one might want to run.
module Measurement : sig ... end
A
Measurement.t
represents the result of measuring execution of aTest.t
. It is used as input for subsequent analysis.
val make_command : Test.t list -> Core.Command.t
make_command tests
is the easiest way to generate a command-line program that runs a list of benchmarks. Heretests : Test.t list
are the benchmarks that should be run. This returns aCommand.t
which provides a command-line interface for running the benchmarks. See notes above for an example.
val bench : ?run_config:Run_config.t -> ?analysis_configs:Analysis_config.t list -> ?display_config:Display_config.t -> ?save_to_file:(Measurement.t -> string) -> ?libname:string -> Test.t list -> unit
bench tests
will run, analyze and display the specifiedtests
. Use this when one needs more control over the execution parameters that what is exposed throughmake_command
.bench
can also save the measurements of each test to the filename returned bysave_to_file
.
val measure : ?run_config:Run_config.t -> Test.t list -> Measurement.t list
measure
is a fragment of the functionality ofbench
.measure tests
will run the specifiedtests
and return the resulting measurement results.
val analyze : ?analysis_configs:Analysis_config.t list -> Measurement.t -> Analysis_result.t Core.Or_error.t
analyze
is a fragment of the functionality ofbench
.analyze ~analysis_configs m
will analyze the measurementm
using the regressions specified.
val display : ?libname:string -> ?display_config:Display_config.t -> Analysis_result.t list -> unit
display
is a fragment of the functionality ofbench
.display results
will display a tabular summary ofresults
on the terminal.
val make_command_ext : summary:string -> ((Analysis_config.t list * Display_config.t * [ `From_file of string list | `Run of (Measurement.t -> string) option * Run_config.t ]) -> unit) Core.Command.Param.t -> Core.Command.t
make_command_ext
is useful for creatingCommand.t
s that have command line flags in addition to those provided bymake_command
.