Mercurial > repos > public > sbplib_julia
comparison benchmark/run_and_view.jl @ 1181:f49bac53e72b tooling/benchmarks
Factor out function for adding mercurial rev info
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 27 Jan 2023 11:31:47 +0100 |
parents | 37f29a3a78dc |
children | aefe4b551901 |
comparison
equal
deleted
inserted
replaced
1180:37f29a3a78dc | 1181:f49bac53e72b |
---|---|
18 # TBD: What parts are PkgBenchmark contributing? Can it be stripped out? Can we replace the html output part? | 18 # TBD: What parts are PkgBenchmark contributing? Can it be stripped out? Can we replace the html output part? |
19 | 19 |
20 function run_benchmark() | 20 function run_benchmark() |
21 r = PkgBenchmark.benchmarkpkg(Sbplib) | 21 r = PkgBenchmark.benchmarkpkg(Sbplib) |
22 | 22 |
23 commit = hg_id() | 23 rev = hg_id() |
24 | 24 |
25 return add_rev_info(r, rev) | |
26 end | |
27 | |
28 function run_benchmark(rev) | |
29 rev_before = hg_rev() | |
30 hg_update(rev) | |
31 r = run_benchmark() | |
32 hg_update(rev_before) | |
33 | |
34 return run_benchmark() | |
35 end | |
36 | |
37 function add_rev_info(benchmarkresult, rev) | |
25 return PkgBenchmark.BenchmarkResults( | 38 return PkgBenchmark.BenchmarkResults( |
26 "Sbplib.jl", | 39 r.name, |
27 commit, | 40 rev, |
28 r.benchmarkgroup, | 41 r.benchmarkgroup, |
29 r.date, | 42 r.date, |
30 r.julia_commit, | 43 r.julia_commit, |
31 r.vinfo, | 44 r.vinfo, |
32 r.benchmarkconfig, | 45 r.benchmarkconfig, |