Mercurial > repos > public > sbplib_julia
comparison benchmark/benchmark_utils.jl @ 1896:9d708f3300d5
Fix bug in benchmark_utils.jl
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 31 Jan 2025 15:52:49 +0100 |
parents | e1d64f4110bd |
children |
comparison
equal
deleted
inserted
replaced
1893:ecec13fec21c | 1896:9d708f3300d5 |
---|---|
80 | 80 |
81 `target` and `baseline` can be any identifier compatible with `hg update`. | 81 `target` and `baseline` can be any identifier compatible with `hg update`. |
82 | 82 |
83 Returns a `PkgBenchmark.BenchmarkJudgement` | 83 Returns a `PkgBenchmark.BenchmarkJudgement` |
84 """ | 84 """ |
85 function compare_benchmarks(target, baseline, f=minimum; judgekwargs=Dict(), kwargs...) | 85 function compare_benchmarks(target, baseline; f=minimum, judgekwargs=Dict(), kwargs...) |
86 t = run_benchmark(target; kwargs...) | 86 t = run_benchmark(target; kwargs...) |
87 b = run_benchmark(baseline; kwargs...) | 87 b = run_benchmark(baseline; kwargs...) |
88 | 88 |
89 return PkgBenchmark.judge(t,b,f; judgekwargs...) | 89 return PkgBenchmark.judge(t,b,f; judgekwargs...) |
90 end | 90 end |
95 Compare the results at the current working directory with the revision | 95 Compare the results at the current working directory with the revision |
96 specified in `baseline`. | 96 specified in `baseline`. |
97 | 97 |
98 Accepts the same arguments as the two revision version. | 98 Accepts the same arguments as the two revision version. |
99 """ | 99 """ |
100 function compare_benchmarks(baseline, f=minimum; judgekwargs=Dict(), kwargs...) | 100 function compare_benchmarks(baseline; f=minimum, judgekwargs=Dict(), kwargs...) |
101 t = run_benchmark(;kwargs...) | 101 t = run_benchmark(;kwargs...) |
102 b = run_benchmark(baseline; kwargs...) | 102 b = run_benchmark(baseline; kwargs...) |
103 | 103 |
104 return PkgBenchmark.judge(t,b,f; judgekwargs...) | 104 return PkgBenchmark.judge(t,b,f; judgekwargs...) |
105 end | 105 end |