Introduce "benches" feature

So that benchmarks don't run each time tests run
This commit is contained in:
Paul Hauner 2018-09-29 13:01:33 +09:30
parent 7c88f94377
commit e0e8aa98f4
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C
3 changed files with 4 additions and 3 deletions

View File

@ -36,3 +36,6 @@ ring = { git = "https://github.com/paritytech/ring" }
[[bin]] [[bin]]
path = "lighthouse/main.rs" path = "lighthouse/main.rs"
name = "lighthouse" name = "lighthouse"
[features]
benches = []

View File

@ -65,7 +65,6 @@ fn bench_block_validation_scenario<F>(
} }
#[bench] #[bench]
#[ignore]
fn bench_block_validation_10m_eth(b: &mut Bencher) { fn bench_block_validation_10m_eth(b: &mut Bencher) {
let total_validators: usize = 10_000_000 / 32; let total_validators: usize = 10_000_000 / 32;
let cycle_length: u8 = 64; let cycle_length: u8 = 64;
@ -100,7 +99,6 @@ fn bench_block_validation_10m_eth(b: &mut Bencher) {
} }
#[bench] #[bench]
#[ignore]
fn bench_block_validation_100m_eth(b: &mut Bencher) { fn bench_block_validation_100m_eth(b: &mut Bencher) {
let total_validators: usize = 100_000_000 / 32; let total_validators: usize = 100_000_000 / 32;
let cycle_length: u8 = 64; let cycle_length: u8 = 64;

View File

@ -1,7 +1,7 @@
mod validate_ssz_block; mod validate_ssz_block;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
#[cfg(test)] #[cfg(all(feature = "benches", test))]
mod benches; mod benches;
use super::attestation_record; use super::attestation_record;