package bechamel
Module Bechamel.BenchmarkSource
Type of configuration.
Source
val cfg :
?limit:int ->
?quota:Time.span ->
?kde:int option ->
?sampling:sampling ->
?stabilize:bool ->
?compaction:bool ->
?start:int ->
unit ->
configurationcfg () returns a configuration needed to run a benchmark. It accepts several optional arguments:
limitis the maximum ofsamplesallowed (default to3000).quotais the maximum of time allowed (default to 1 second).kde: optional number of additional measurements taken to enable kde and histogram js display (default None). Ifkde= Some _, the same time limitquotais applied, meaning the actual time limit for all the benchmarks is actually 2xquota.samplingis the way to grow therunmetric (default to`Geometric 1.0.1).stabilizeallows the benchmark to stabilize the garbage collector before each run (default totrue).startis the first value of therunmetric (default to1).
Source
type stats = {start : int;sampling : sampling;stabilize : bool;quota : Time.span;limit : int;instances : string list;samples : int;time : Time.span;
}Type of statistics of one benchmark. It contains which configuration the benchmark used and:
- How long was the benchmark, see
time. - How many runs the benchmark did, see
samples.
It's useful to introspect which limit was reached (the time or the limit of runs).
Results of one benchmark:
statscontains all the information about the benchmarks as described abovelrcontains the measurements necessary for oLS and ransac analysis.kdeoptionally contains more measurements to enable the display of density function (KDE or histogram) with the js display.
run cfg measures test returns samples of measures according to the given configuration cfg. It returns statistics of the benchmark too.
all cfg measures tests calls run for each element of tests (see Test.elements).