Benchee v0.2.0 Benchee.Config

Functions to handle the configuration of Benchee, exposes init function.

Summary

Functions

Returns the initial benchmark configuration for Benhee, composed of defauls and an optional custom configuration. Configuration times are given in seconds, but are converted to microseconds

Functions

init(config \\ %{})

Returns the initial benchmark configuration for Benhee, composed of defauls and an optional custom configuration. Configuration times are given in seconds, but are converted to microseconds.

Possible options:

  • time - total run time in seconds of a single benchmark (determines how often it is executed). Defaults to 5.
  • warmup - the time in seconds for which the benchmarking function should be run without gathering results. Defaults to 2.

Examples

iex> Benchee.init
%{config: %{time: 5_000_000, warmup: 2_000_000}, jobs: []}

iex> Benchee.init %{time: 1, warmup: 0.2}
%{config: %{time: 1_000_000, warmup: 200_000.0}, jobs: []}