Mercurial > repos > public > sbplib_julia
changeset 1197:5e20c0815e07 tooling/benchmarks
Pass kwargs from main() and run_benchmarks() to benchmarkpkg()
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 31 Jan 2023 20:35:29 +0100 |
parents | 2f208828ae58 |
children | 5d4a15d6118f |
files | benchmark/benchmark_utils.jl |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/benchmark/benchmark_utils.jl Fri Jan 27 22:21:08 2023 +0100 +++ b/benchmark/benchmark_utils.jl Tue Jan 31 20:35:29 2023 +0100 @@ -27,8 +27,8 @@ Runs the benchmark suite for the current working directory and returns a `PkgBenchmark.BenchmarkResult` """ -function run_benchmark() - r = PkgBenchmark.benchmarkpkg(Sbplib) +function run_benchmark(;kwargs...) + r = PkgBenchmark.benchmarkpkg(Sbplib; kwargs...) rev = hg_id() @@ -43,10 +43,10 @@ Returns a `PkgBenchmark.BenchmarkResult` """ -function run_benchmark(rev) +function run_benchmark(rev; kwargs...) rev_before = hg_rev() hg_update(rev) - r = run_benchmark() + r = run_benchmark(;kwargs...) hg_update(rev_before) return r @@ -62,12 +62,12 @@ Returns a `PkgBenchmark.BenchmarkJudgement` """ -function run_benchmark(target, baseline, f=minimum; judgekwargs=Dict()) +function run_benchmark(target, baseline, f=minimum; judgekwargs=Dict(), kwargs...) rev_before = hg_rev() hg_update(target) - t = run_benchmark() + t = run_benchmark(;kwargs...) hg_update(baseline) - b = run_benchmark() + b = run_benchmark(;kwargs...) hg_update(rev_before) return PkgBenchmark.judge(t,b,f; judgekwargs...)