From ceb9385c7e8e7d8434f7b1ccfbca4de0a7b9f13d Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Thu, 1 Aug 2024 14:27:53 +0200 Subject: [PATCH] Fix feature check for benchmark svg output --- benches/throughput/main.rs | 2 +- benches/throughput/result_processor.rs | 2 +- benches/throughput_criterion.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benches/throughput/main.rs b/benches/throughput/main.rs index 2315722..c84a9cc 100644 --- a/benches/throughput/main.rs +++ b/benches/throughput/main.rs @@ -38,7 +38,7 @@ fn main() { }; // GxHash - let gxhash_name = if cfg!(hybrid) { "GxHash-Hybrid" } else { "GxHash" }; + let gxhash_name = if cfg!(feature = "hybrid") { "GxHash-Hybrid" } else { "GxHash" }; benchmark(processor.as_mut(), slice, gxhash_name, |data: &[u8], seed: i64| -> u64 { gxhash64(data, seed) }); diff --git a/benches/throughput/result_processor.rs b/benches/throughput/result_processor.rs index 2b15546..aef26cc 100644 --- a/benches/throughput/result_processor.rs +++ b/benches/throughput/result_processor.rs @@ -120,7 +120,7 @@ impl ResultProcessor for OutputPlot { fn finish(&self) { let mut arch = std::env::consts::ARCH.to_string(); - if cfg!(hybrid) { + if cfg!(feature = "hybrid") { arch += "-hybrid"; } let file_name = format!("benches/throughput/{}.svg", arch); diff --git a/benches/throughput_criterion.rs b/benches/throughput_criterion.rs index 38135e1..5fb7ce7 100644 --- a/benches/throughput_criterion.rs +++ b/benches/throughput_criterion.rs @@ -44,7 +44,7 @@ fn benchmark_all(c: &mut Criterion) { group.plot_config(plot_config); // GxHash - let gxhash_name = if cfg!(hybrid) { "GxHash-Hybrid" } else { "GxHash" }; + let gxhash_name = if cfg!(feature = "hybrid") { "GxHash-Hybrid" } else { "GxHash" }; benchmark(&mut group, slice, gxhash_name, |data: &[u8], seed: i32| -> u64 { gxhash64(data, seed as i64) });