comparison benchmark/benchmark_utils.jl @ 1881:e1d64f4110bd

Fix typos in benchmark_utils.jl
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 28 Jan 2025 15:38:15 +0100
parents 471a948cd2b2
children 9d708f3300d5
comparison
equal deleted inserted replaced
1876:9c2613880213 1881:e1d64f4110bd
8 const diffinitive_root = splitpath(pathof(Diffinitive))[1:end-2] |> joinpath 8 const diffinitive_root = splitpath(pathof(Diffinitive))[1:end-2] |> joinpath
9 const results_dir = mkpath(joinpath(diffinitive_root, "benchmark/results")) 9 const results_dir = mkpath(joinpath(diffinitive_root, "benchmark/results"))
10 const template_path = joinpath(diffinitive_root, "benchmark/result.tmpl") 10 const template_path = joinpath(diffinitive_root, "benchmark/result.tmpl")
11 11
12 """ 12 """
13 mainmain(;rev=nothing, target=nothing, baseline=nothing , kwargs...) 13 main(;rev=nothing, target=nothing, baseline=nothing , kwargs...)
14 14
15 Calls `run_benchmark(args...; kwargs...)` and writes the results as an HTML 15 Calls `run_benchmark(args...; kwargs...)` and writes the results as an HTML
16 file in `benchmark/results`. 16 file in `benchmark/results`.
17 17
18 * If `rev` is set, the benchmarks are run for the given mercurial revision. 18 * If `rev` is set, the benchmarks are run for the given mercurial revision.
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