Skip to content

Commit

Permalink
Save benchee data between runs
Browse files Browse the repository at this point in the history
  • Loading branch information
michalmuskala committed Dec 21, 2021
1 parent af4fc55 commit 4352cd9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ erl_crash.dump

# Ignore benchmark specific dependencies etc (separate project to work around problems with dependencies)
/bench/_build
/bench/deps
/bench/deps
/bench/benchmark.benchee
9 changes: 9 additions & 0 deletions bench/decode.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ end

inputs = for name <- decode_inputs, into: %{}, do: {name, read_data.(name)}

IO.puts("Checking jobs don't crash")
for {name, input} <- inputs, {job, decode_job} <- decode_jobs do
IO.puts("Testing #{job} #{name}")
decode_job.(input)
end
IO.puts("\n")

Benchee.run(decode_jobs,
# parallel: 4,
warmup: 5,
time: 30,
memory_time: 1,
inputs: inputs,
save: %{path: "output/runs/#{DateTime.utc_now()}.benchee"},
load: "output/runs/*.benchee",
formatters: [
{Benchee.Formatters.HTML, file: Path.expand("output/decode.html", __DIR__)},
Benchee.Formatters.Console,
Expand Down

0 comments on commit 4352cd9

Please sign in to comment.