Skip to content

Commit

Permalink
Merge #2253
Browse files Browse the repository at this point in the history
2253: Calculate metrics only for confirmed priority ops r=Deniallugo a=Deniallugo

Signed-off-by: deniallugo <[email protected]>

Co-authored-by: deniallugo <[email protected]>
Co-authored-by: Danil <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and Deniallugo authored May 23, 2022
2 parents 99527f5 + fae1a30 commit a5a1b6b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions core/lib/mempool/src/transactions_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ impl MempoolTransactionsHandler {
TxAddError::DbError
})?;

for op in &ops {
let labels = vec![
("stage", "mempool".to_string()),
("name", op.data.variance_name()),
("token", op.data.token_id().to_string()),
];
metrics::increment_counter!("process_tx_count", &labels);
if confirmed {
for op in &ops {
let labels = vec![
("stage", "mempool".to_string()),
("name", op.data.variance_name()),
("token", op.data.token_id().to_string()),
];
metrics::increment_counter!("process_tx_count", &labels);
}
}

Ok(())
Expand Down

0 comments on commit a5a1b6b

Please sign in to comment.