fix benchmarks being broken for every target except wam32
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
|
||||||
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
|
|
||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
|
||||||
use scryer_prolog::machine::parsed_results::QueryResolution;
|
|
||||||
|
|
||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||||
mod setup;
|
mod setup;
|
||||||
|
|
||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||||
|
mod iai {
|
||||||
|
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
|
||||||
|
|
||||||
|
use scryer_prolog::machine::parsed_results::QueryResolution;
|
||||||
|
|
||||||
|
use super::setup;
|
||||||
|
|
||||||
#[library_benchmark]
|
#[library_benchmark]
|
||||||
#[bench::count_edges(setup::prolog_benches()["count_edges"].setup())]
|
#[bench::count_edges(setup::prolog_benches()["count_edges"].setup())]
|
||||||
#[bench::numlist(setup::prolog_benches()["numlist"].setup())]
|
#[bench::numlist(setup::prolog_benches()["numlist"].setup())]
|
||||||
@@ -15,13 +17,13 @@ fn bench(mut run: impl FnMut() -> QueryResolution) -> QueryResolution {
|
|||||||
run()
|
run()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
|
||||||
library_benchmark_group!(
|
library_benchmark_group!(
|
||||||
name = benches;
|
name = benches;
|
||||||
benchmarks = bench
|
benchmarks = bench
|
||||||
);
|
);
|
||||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
|
||||||
main!(library_benchmark_groups = benches);
|
|
||||||
|
|
||||||
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
main!(library_benchmark_groups = benches);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user