benchee v0.3.0 Release Notes

Release Date: 2016-07-11 // almost 8 years ago
  • ๐Ÿš€ This release switches internal data structures from lists of tuples to maps, allows the configuration of formatters, aggregates all values and hands them down so formatters can access the whole configuration, prints general configuration information and much more great stuff :)

    ๐Ÿ’ฅ Breaking Changes (User Facing)

    • The recommended data structure handed to Benchee.run was changed from a list of 2-element tuples to a map ("Name" => benchmark_function). However, the old list of tuples still works but may be removed in future releases (so it's not "breaking" strictly speaking).
    • ๐Ÿ‘ท You can not have benchmark jobs with the same names anymore, the last one wins here. This was the reason why previously the data structure was a list of tuples. However, having benchmarks with the same name is nonsensical as you can't discern their results in the output any way.

    ๐Ÿ’ฅ Breaking Changes (Plugins)

    • ๐Ÿ‘ท main data structure to hold benchmarks and results was changed from a list of 2-element tuples to a map ("Name" => values). That is for the jobs, the run times as well as the statistics. However, if you used something like Enum.each(data, fn({name, value}) -> .. end) you are still fine though, cause Elixir is awesome :)

    ๐Ÿ”‹ Features (User Facing)

    • ๐Ÿ”ง now takes a parallel: number configuration option and will then execute each job in parallel in as many parallel processes as specified in number. This way you can gather more samples in the same time and also simulate a system more under load. This is tricky, however. One of the use cases is also stress testing a system. Thanks @ldr
    • the name column width is now determined based on the longest name. Thanks @alvinlindstam
    • ๐Ÿ”ง Print general configuration information at the start of the benchmark, including warmup, time, parallel and an estimated total run time
    • ๐Ÿ†• New method Benchee.Formatters.Console.output/1 that immediately prints to the console
    • ๐Ÿ”ง now takes a formatters: [&My.Format.function/1, &Benchee.Formatters.console.output/1] configuration option with which multiple formatters for the same benchmarking run can be configured when using Benchee.run/2. E.g. you can print results to the console and create a csv from that same run. Defaults to the builtin Console formatter.

    ๐Ÿ”‹ Features (Plugins)

    • All previous configuration options are preserved after Benchee.Statistics.statistics/1, meaning there is access to raw run times as well as custom options etc. E.g. you could grab custom options like %{csv: %{file: "my_file_name.csv"}} to use.

    ๐Ÿ›  Bugfixes

    • name columns are no longer truncated after 30 characters. Thanks @alvinlindstam