@@ -13,7 +13,7 @@ use base_reth_flashblocks::{
1313 Flashblock , FlashblocksAPI , FlashblocksReceiver , FlashblocksState , Metadata ,
1414} ;
1515use base_reth_test_utils:: { accounts:: TestAccounts , harness:: TestHarness , node:: LocalNodeProvider } ;
16- use criterion:: { BatchSize , Criterion , criterion_group, criterion_main} ;
16+ use criterion:: { BatchSize , Criterion , Throughput , criterion_group, criterion_main} ;
1717use op_alloy_consensus:: OpDepositReceipt ;
1818use reth:: {
1919 chainspec:: { ChainSpecProvider , EthChainSpec } ,
@@ -88,7 +88,7 @@ fn pending_state_benches(c: &mut Criterion) {
8888 init_bench_tracing ( ) ;
8989
9090 let runtime = Runtime :: new ( ) . expect ( "tokio runtime should start" ) ;
91- let setup = runtime. block_on ( BenchSetup :: new ( & [ 5 , 25 ] ) ) ;
91+ let setup = runtime. block_on ( BenchSetup :: new ( & [ 5 , 25 , 100 ] ) ) ;
9292 let mut group = c. benchmark_group ( "pending_state_build" ) ;
9393
9494 for ( label, flashblocks) in setup. flashblocks {
@@ -97,6 +97,9 @@ fn pending_state_benches(c: &mut Criterion) {
9797 let target_block = setup. target_block ;
9898 let flashblocks = flashblocks. clone ( ) ;
9999 let last_index = flashblocks. last ( ) . map ( |fb| fb. index ) . unwrap_or_default ( ) ;
100+ let tx_count = flashblocks. iter ( ) . map ( |fb| fb. diff . transactions . len ( ) ) . sum :: < usize > ( ) ;
101+
102+ group. throughput ( Throughput :: Elements ( tx_count as u64 ) ) ;
100103
101104 group. bench_function ( label, |b| {
102105 b. to_async ( & runtime) . iter_batched (
0 commit comments