Mercurial > repos > public > sbplib_julia
comparison benchmark/benchmark_utils.jl @ 1545:237b980ffb91 bugfix/sbp_operators/stencil_return_type
Fix typo
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 12 Apr 2024 12:00:43 +0200 |
parents | 5193e6cd6c6a |
children |
comparison
equal
deleted
inserted
replaced
1543:a064a8bd413f | 1545:237b980ffb91 |
---|---|
70 run_benchmark(; kwargs...) | 70 run_benchmark(; kwargs...) |
71 end | 71 end |
72 end | 72 end |
73 | 73 |
74 """ | 74 """ |
75 compare_benchmarks(target, baseline, f=minimum; judgekwargs=Dict()) | 75 compare_benchmarks(target, baseline; f=minimum, judgekwargs=Dict(), kwargs...) |
76 | 76 |
77 Runs the benchmark at revisions `target` and `baseline` and compares them | 77 Runs the benchmark at revisions `target` and `baseline` and compares them |
78 using `PkgBenchmark.judge`. `f` is the function used to compare. `judgekwargs` | 78 using `PkgBenchmark.judge`. `f` is the function used to compare. `judgekwargs` |
79 are keyword arguments passed to `judge`. | 79 are keyword arguments passed to `judge`. |
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_benchmark(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 |