Skip to content

Commit

Permalink
Properly indent code for highlighting
Browse files Browse the repository at this point in the history
See #57 by @kianmeng
  • Loading branch information
PragTob committed Dec 10, 2023
1 parent dd2858f commit 4f0901a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/benchee/formatters/html.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ defmodule Benchee.Formatters.HTML do
## 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"}
]
)
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"}
]
)
"""

@behaviour Benchee.Formatter
Expand Down

0 comments on commit 4f0901a

Please sign in to comment.