Benchee v0.8.0 Benchee

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

Summary

Functions

benchmark(suite, name, function)

See Benchee.Benchmark.benchmark/3.

benchmark(suite, name, function, printer)

See Benchee.Benchmark.benchmark/4.

measure(suite)

See Benchee.Benchmark.measure/1.

measure(suite, printer)

See Benchee.Benchmark.measure/2.

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
  • configuration - configuration options to alter what Benchee does, see Benchee.Configuration.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)

See Benchee.Statistics.statistics/1.

system(suite)

See Benchee.System.system/1.