Skip to content

Commit

Permalink
Format benchmark files
Browse files Browse the repository at this point in the history
  • Loading branch information
williamthome committed Aug 8, 2024
1 parent be6005e commit 68c1734
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
inputs: ["{mix,.formatter}.exs", "{benchmark,config,lib,test}/**/*.{ex,exs}"]
]
8 changes: 6 additions & 2 deletions benchmark/exneus_benchmark.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ defmodule Exneus.Benchmark do
{Benchee.Formatters.Console, comparison: true, extended_statistics: false}
] ++
if opts[:graph] do
[{Benchee.Formatters.HTML, file: Path.expand("./report/#{label}/graph/#{label}.html", __DIR__)}]
[
{Benchee.Formatters.HTML,
file: Path.expand("./report/#{label}/graph/#{label}.html", __DIR__)}
]
else
[]
end ++
if opts[:markdown] do
[
{Benchee.Formatters.Markdown, file: Path.expand("./report/#{label}/markdown/#{label}.md", __DIR__)}
{Benchee.Formatters.Markdown,
file: Path.expand("./report/#{label}/markdown/#{label}.md", __DIR__)}
]
else
[]
Expand Down
36 changes: 18 additions & 18 deletions benchmark/exneus_decode_benchmark.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs = %{
"JSON" => &JSON.decode!/1,
"jsone" => &:jsone.decode/1,
"jsx" => &:jsx.decode/1,
"jiffy" => &:jiffy.decode/1,
"jiffy" => &:jiffy.decode/1
}

data = [
"Blockchain",
#"Giphy",
#"GitHub",
#"GovTrack",
#"Issue 90",
#"JSON Generator (Pretty)",
#"JSON Generator",
#"Pokedex",
#"UTF-8 escaped",
#"UTF-8 unescaped"
"Blockchain"
# "Giphy",
# "GitHub",
# "GovTrack",
# "Issue 90",
# "JSON Generator (Pretty)",
# "JSON Generator",
# "Pokedex",
# "UTF-8 escaped",
# "UTF-8 unescaped"
]

inputs =
Expand All @@ -37,12 +37,12 @@ Exneus.Benchmark.run(
jobs,
inputs,
%{
#markdown: true,
graph: true,
#save: true,
#parallel: 1,
#warmup: 5,
#time: 5,
#memory_time: 1,
# markdown: true,
graph: true
# save: true,
# parallel: 1,
# warmup: 5,
# time: 5,
# memory_time: 1,
}
)
32 changes: 16 additions & 16 deletions benchmark/exneus_encode_benchmark.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs = %{
"JSON" => &JSON.encode!/1,
"jsone" => &:jsone.encode/1,
"jsx" => &:jsx.encode/1,
"jiffy" => &:jiffy.encode/1,
"jiffy" => &:jiffy.encode/1
}

data = [
"Blockchain",
#"Giphy",
#"GitHub",
#"GovTrack",
#"Issue 90",
#"JSON Generator",
#"Pokedex",
#"UTF-8 unescaped"
"Blockchain"
# "Giphy",
# "GitHub",
# "GovTrack",
# "Issue 90",
# "JSON Generator",
# "Pokedex",
# "UTF-8 unescaped"
]

inputs =
Expand All @@ -36,12 +36,12 @@ Exneus.Benchmark.run(
jobs,
inputs,
%{
#markdown: true,
graph: true,
#save: true,
#parallel: 1,
#warmup: 5,
#time: 5
#memory_time: 1,
# markdown: true,
graph: true
# save: true,
# parallel: 1,
# warmup: 5,
# time: 5
# memory_time: 1,
}
)

0 comments on commit 68c1734

Please sign in to comment.