Introduce "benches" feature
So that benchmarks don't run each time tests run
This commit is contained in:
parent
7c88f94377
commit
e0e8aa98f4
@ -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 = []
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user