Skip to content

Commit

Permalink
feat: extended criterion measurement time to 20s for consistent results
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Sep 17, 2024
1 parent 6f30f1a commit d4f5db4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion crates/blockifier/bench/blockifier_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
//!
//! Run the benchmarks using `cargo bench --bench blockifier_bench`.
use std::time::Duration;

use blockifier::context::BlockContext;
use blockifier::invoke_tx_args;
use blockifier::state::cached_state::{CachedState, TransactionalState};
Expand Down Expand Up @@ -240,5 +242,9 @@ pub fn execution_benchmark(c: &mut Criterion) {
});
}

criterion_group!(benches, transfers_benchmark, execution_benchmark, cached_state_benchmark);
criterion_group! {
name = benches;
config = Criterion::default().measurement_time(Duration::from_secs(20));
targets = transfers_benchmark, execution_benchmark, cached_state_benchmark
}
criterion_main!(benches);
5 changes: 3 additions & 2 deletions crates/blockifier/src/concurrency/fee_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ pub fn fill_sequencer_balance_reads(
) {
let storage_read_values = if fee_transfer_call_info.inner_calls.is_empty() {
&mut fee_transfer_call_info.storage_read_values
} else {
// Proxy pattern.
} else
// Proxy pattern.
{
assert_eq!(
fee_transfer_call_info.inner_calls.len(),
1,
Expand Down

0 comments on commit d4f5db4

Please sign in to comment.