comparison benchmark/benchmark_utils.jl @ 1882:ca3d8a571505 refactor/lazy_tensors/elementwise_ops

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 28 Jan 2025 15:38:51 +0100
parents e1d64f4110bd
children 9d708f3300d5
comparison
equal deleted inserted replaced
1880:378002c78e86 1882:ca3d8a571505
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