Add counter for tx count and limit error messages
This commit is contained in:
committed by
sakridge
parent
1e63702c36
commit
313fed375c
@ -307,12 +307,19 @@ impl Bank {
|
||||
);
|
||||
|
||||
let mut tx_count = 0;
|
||||
let mut err_count = 0;
|
||||
for r in &res {
|
||||
if r.is_ok() {
|
||||
tx_count += 1;
|
||||
} else {
|
||||
if err_count == 0 {
|
||||
info!("tx error: {:?}", r);
|
||||
}
|
||||
err_count += 1;
|
||||
}
|
||||
}
|
||||
if err_count > 0 {
|
||||
info!("{} errors of {} txs", err_count, err_count + tx_count);
|
||||
}
|
||||
self.transaction_count
|
||||
.fetch_add(tx_count, Ordering::Relaxed);
|
||||
|
@ -88,6 +88,7 @@ impl BankingStage {
|
||||
timing::duration_as_ms(&recv_start.elapsed()),
|
||||
mms.len(),
|
||||
);
|
||||
let bank_starting_tx_count = bank.transaction_count();
|
||||
let count = mms.iter().map(|x| x.1.len()).sum();
|
||||
let proc_start = Instant::now();
|
||||
for (msgs, vers) in mms {
|
||||
@ -125,6 +126,10 @@ impl BankingStage {
|
||||
(reqs_len as f32) / (total_time_s)
|
||||
);
|
||||
inc_new_counter!("banking_stage-process_packets", count);
|
||||
inc_new_counter!(
|
||||
"banking_stage-process_transactions",
|
||||
bank.transaction_count() - bank_starting_tx_count
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user