Module Core_bench__Bench

module Test : sig ... end

Test.t are benchmarked by calls to bench.

module Variable : sig ... end

Variable.ts represent variables than can be used as predictors or the responder when specifying a regression.

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 by Core_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 a Test.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. Here tests : Test.t list are the benchmarks that should be run. This returns a Command.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 specified tests. Use this when one needs more control over the execution parameters that what is exposed through make_command. bench can also save the measurements of each test to the filename returned by save_to_file.

val measure : ?⁠run_config:Run_config.t ‑> Test.t list ‑> Measurement.t list

measure is a fragment of the functionality of bench. measure tests will run the specified tests and return the resulting measurement results.

val analyze : ?⁠analysis_configs:Analysis_config.t list ‑> Measurement.t ‑> Core_bench.Analysis_result.t Core.Or_error.t

analyze is a fragment of the functionality of bench. analyze ~analysis_configs m will analyze the measurement m using the regressions specified.

val display : ?⁠libname:string ‑> ?⁠display_config:Display_config.t ‑> Core_bench.Analysis_result.t list ‑> unit

display is a fragment of the functionality of bench. display results will display a tabular summary of results 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 creating Command.ts that have command line flags in addition to those provided by make_command.