Benchmark improvements

* CI: Clean offline; display cleaned bytes; one artifact upload
* Add missing csv bench to iai benchmarks
* Generate flamegraphs for benchmarks
* Validate benchmark results separately
This commit is contained in:
infogulch
2023-11-15 23:18:41 -06:00
parent c6f3700de1
commit 1c94624958
8 changed files with 315 additions and 74 deletions

View File

@@ -1,21 +1,18 @@
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
use scryer_prolog::machine::parsed_results::QueryResolution;
mod setup;
#[library_benchmark]
#[bench::normal(setup::prolog_benches()["count_edges_short"].setup())]
fn bench_edges(mut run: impl FnMut()) {
run();
}
#[library_benchmark]
#[bench::normal(setup::prolog_benches()["numlist_short"].setup())]
fn bench_numlist(mut run: impl FnMut()) {
run();
#[bench::count_edges(setup::prolog_benches()["count_edges"].setup())]
#[bench::numlist(setup::prolog_benches()["numlist"].setup())]
#[bench::csv_codename(setup::prolog_benches()["csv_codename"].setup())]
fn bench(mut run: impl FnMut() -> QueryResolution) -> QueryResolution {
run()
}
library_benchmark_group!(
name = bench_group;
benchmarks = bench_edges, bench_numlist
name = benches;
benchmarks = bench
);
main!(library_benchmark_groups = bench_group);
main!(library_benchmark_groups = benches);