Mercurial > repos > public > sbplib_julia
comparison benchmark/run_and_view.jl @ 1188:d2e73d7b417d tooling/benchmarks
Fix bug in runbenchmark(t,b)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 27 Jan 2023 12:11:04 +0100 |
parents | 2ece37edb467 |
children | 525015283843 |
comparison
equal
deleted
inserted
replaced
1187:2ece37edb467 | 1188:d2e73d7b417d |
---|---|
63 `target` and `baseline` can be any identifier compatible with `hg update`. | 63 `target` and `baseline` can be any identifier compatible with `hg update`. |
64 | 64 |
65 Returns a `PkgBenchmark.BenchmarkJudgement` | 65 Returns a `PkgBenchmark.BenchmarkJudgement` |
66 """ | 66 """ |
67 function run_benchmark(target, baseline, f=minimum; judgekwargs=Dict()) | 67 function run_benchmark(target, baseline, f=minimum; judgekwargs=Dict()) |
68 t = run_benchmark(target) | 68 rev_before = hg_rev() |
69 b = run_benchmark(baseline) | 69 hg_update(target) |
70 t = run_benchmark() | |
71 hg_update(baseline) | |
72 b = run_benchmark() | |
73 hg_update(rev_before) | |
70 | 74 |
71 judged = PkgBenchmark.judge(t,b,f; judgekwargs...) | 75 return PkgBenchmark.judge(t,b,f; judgekwargs...) |
72 | |
73 return BenchmarkJudgement(t,b,judged) | |
74 end | 76 end |
75 | 77 |
76 # TBD: How to compare against current working directory? Possible to create a temporary commit? | 78 # TBD: How to compare against current working directory? Possible to create a temporary commit? |
77 | 79 |
78 | 80 |