Mercurial > repos > public > sbplib_julia
diff benchmark/benchmark_utils.jl @ 1317:7110851b9c87 tooling/benchmarks
Change run_benchmark(rev) to use hg_at_revision()
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 28 Apr 2023 08:34:50 +0200 |
parents | 0551fd71682f |
children | e883085a091a |
line wrap: on
line diff
--- a/benchmark/benchmark_utils.jl Thu Apr 27 16:12:13 2023 +0200 +++ b/benchmark/benchmark_utils.jl Fri Apr 28 08:34:50 2023 +0200 @@ -45,12 +45,9 @@ Returns a `PkgBenchmark.BenchmarkResult` """ function run_benchmark(rev; kwargs...) - rev_before = hg_rev() - hg_update(rev) - r = run_benchmark(;kwargs...) - hg_update(rev_before) - - return r + return hg_at_revision(rev) do + run_benchmark(;kwargs...) + end end """