Benchee v0.6.0 Benchee

Top level module providing convenience access to needed functions as well as the very high level Benchee.run API.

Summary

Functions

Convenience access to Benchee.Benchmark.benchmark/3 to define the benchmarks to run in this benchmarking suite

Convenience access to Benchee.Config.init/1 to initialize the configuration

Convenience access to Benchee.Benchmark.measure/1 to run the defined benchmarks and measure their run time

Run benchmark jobs defined by a map and optionally provide configuration options

Convenience access to Benchee.Statistics.statistics/1 to generate statistics

Functions

benchmark(suite, name, function)

Convenience access to Benchee.Benchmark.benchmark/3 to define the benchmarks to run in this benchmarking suite.

init(config \\ %{})

Convenience access to Benchee.Config.init/1 to initialize the configuration.

measure(suite)

Convenience access to Benchee.Benchmark.measure/1 to run the defined benchmarks and measure their run time.

run(jobs, config \\ [])

Run benchmark jobs defined by a map and optionally provide configuration options.

Runs the given benchmarks and prints the results on the console.

  • jobs - a map from descriptive benchmark job name to a function to be executed and benchmarked
  • config - configuration options to alter what Benchee does, see Benchee.Config.init/1 for documentation of the available options.

Examples

Benchee.run(%{"My Benchmark" => fn -> 1 + 1 end,
              "My other benchmrk" => fn -> "1" ++ "1" end}, time: 3)
# Prints a summary of the benchmark to the console
statistics(suite)

Convenience access to Benchee.Statistics.statistics/1 to generate statistics.