benchee_html v0.6.0 Benchee.Formatters.HTML View Source

Functionality for converting Benchee benchmarking results to an HTML page with plotly.js generated graphs and friends.

Examples

list = Enum.to_list(1..10_000) map_fun = fn(i) -> [i, i * i] end

Benchee.run(

%{
  "flat_map" => fn -> Enum.flat_map(list, map_fun) end,
  "map.flatten" => fn -> list |> Enum.map(map_fun) |> List.flatten() end
},
formatters: [
  Benchee.Formatters.Console,
  {Benchee.Formatters.HTML, file: "samples_output/flat_map.html"}
]

)

Link to this section Summary

Functions

Transforms the statistical results from benchmarking to html reports

Link to this section Functions

Link to this function

format(suite, opts) View Source
format(Benchee.Suite.t(), map()) :: %{
  optional(Benchee.Suite.key()) => String.t()
}

Transforms the statistical results from benchmarking to html reports.

Returns a map from file name/path to file content.

Link to this function

write(data, opts) View Source
write(%{optional(Benchee.Suite.key()) => String.t()}, map()) :: :ok

Writes the output of Benchee.Formatters.HTML.format/2 to disk.

Generates the following files:

  • index file (exactly like file is named)
  • a comparison of all the benchmarked jobs (one per benchmarked input)
  • for each job a detail page with more detailed run time graphs for that particular job (one per benchmark input)