Skip to content

Commit a258785

Browse files
committed
Add judgebench() to judge perf b/w commits
1 parent c3ac10f commit a258785

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

benchmark/runbench.jl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,21 @@ function postprocess(results::BenchmarkGroup)
3939
results
4040
end
4141

42-
bench_results = withenv("BENCH_NUM_ITERS"=>string(N)) do
43-
benchmarkpkg("FixedPointDecimals"; postprocess=postprocess)
42+
function runbench()
43+
bench_results = withenv("BENCH_NUM_ITERS"=>string(N)) do
44+
benchmarkpkg("FixedPointDecimals"; postprocess=postprocess)
45+
end
46+
47+
export_markdown(joinpath(@__DIR__, "results.md"), bench_results)
4448
end
4549

46-
export_markdown(joinpath(@__DIR__, "results.md"), bench_results)
50+
function judgebench(target::Union{String, BenchmarkConfig}, baseline::Union{String, BenchmarkConfig})
51+
bench_results = withenv("BENCH_NUM_ITERS"=>string(N)) do
52+
judge("FixedPointDecimals", target, baseline; f=identity, postprocess=postprocess)
53+
end
54+
end
55+
function judgebench(baseline::Union{String, BenchmarkConfig})
56+
judgebench(BenchmarkConfig(), baseline)
57+
end
4758

4859
end

0 commit comments

Comments
 (0)