@@ -53,6 +53,9 @@ use crate::metrics::{
5353 register_metrics,
5454 COMPUTE_DURATION_PER_BLOCK ,
5555 COMPUTE_DURATION_PER_BLOCK_HIST ,
56+ COUNT_CLASSES_TRIE_MODIFICATIONS_PER_BLOCK ,
57+ COUNT_CONTRACTS_TRIE_MODIFICATIONS_PER_BLOCK ,
58+ COUNT_STORAGE_TRIES_MODIFICATIONS_PER_BLOCK ,
5659 OFFSET ,
5760 READ_DB_ENTRIES_PER_BLOCK ,
5861 READ_DURATION_PER_BLOCK ,
@@ -449,7 +452,9 @@ impl ComponentStarter for ApolloCommitter {
449452 }
450453}
451454
452- fn update_metrics ( BlockMeasurement { n_reads, n_writes, durations, .. } : & BlockMeasurement ) {
455+ fn update_metrics (
456+ BlockMeasurement { n_reads, n_writes, durations, modifications_counts } : & BlockMeasurement ,
457+ ) {
453458 READ_DURATION_PER_BLOCK . set_lossy ( durations. read ) ;
454459 READ_DURATION_PER_BLOCK_HIST . record_lossy ( durations. read ) ;
455460 READ_DB_ENTRIES_PER_BLOCK . set_lossy ( * n_reads) ;
@@ -458,4 +463,7 @@ fn update_metrics(BlockMeasurement { n_reads, n_writes, durations, .. }: &BlockM
458463 WRITE_DURATION_PER_BLOCK . set_lossy ( durations. write ) ;
459464 WRITE_DURATION_PER_BLOCK_HIST . record_lossy ( durations. write ) ;
460465 WRITE_DB_ENTRIES_PER_BLOCK . set_lossy ( * n_writes) ;
466+ COUNT_STORAGE_TRIES_MODIFICATIONS_PER_BLOCK . set_lossy ( modifications_counts. storage_tries ) ;
467+ COUNT_CONTRACTS_TRIE_MODIFICATIONS_PER_BLOCK . set_lossy ( modifications_counts. contracts_trie ) ;
468+ COUNT_CLASSES_TRIE_MODIFICATIONS_PER_BLOCK . set_lossy ( modifications_counts. classes_trie ) ;
461469}
0 commit comments