Benchee v0.9.0 Benchee.Benchmark View Source

Functionality related to the actual benchmarking. Meaning running the given functions and recording their individual run times in a list. Exposes benchmark function.

Link to this section Summary

Functions

Adds the given function and its associated name to the benchmarking jobs to be run in this benchmarking suite as a tuple {name, function} to the list under the :jobs key

Executes the benchmarks defined before by first running the defined functions for warmup time without gathering results and them running them for time gathering their run times

Key in the result for when there were no inputs given

Link to this section Types

Link to this section Functions

Link to this function benchmark(suite, name, function, printer \\ Printer) View Source
benchmark(Benchee.Suite.t, name, (... -> any), module) :: Benchee.Suite.t

Adds the given function and its associated name to the benchmarking jobs to be run in this benchmarking suite as a tuple {name, function} to the list under the :jobs key.

Link to this function measure(suite, printer \\ Printer) View Source
measure(Benchee.Suite.t, module) :: Benchee.Suite.t

Executes the benchmarks defined before by first running the defined functions for warmup time without gathering results and them running them for time gathering their run times.

This means the total run time of a single benchmarking job is warmup + time.

Warmup is usually important for run times with JIT but it seems to have some effect on the BEAM as well.

There will be parallel processes spawned exeuting the benchmark job in parallel.

Key in the result for when there were no inputs given.