From b4fa34a91c8f7481c686d5a71dff30c6122bb703 Mon Sep 17 00:00:00 2001 From: ksolana <110843012+ksolana@users.noreply.github.com> Date: Mon, 28 Oct 2024 08:57:09 -0700 Subject: [PATCH] Directly send the commit_count instead of computing the mean --- core/src/banking_stage/consume_worker.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/banking_stage/consume_worker.rs b/core/src/banking_stage/consume_worker.rs index 6ea3d408777585..971e5abb2682fe 100644 --- a/core/src/banking_stage/consume_worker.rs +++ b/core/src/banking_stage/consume_worker.rs @@ -316,7 +316,9 @@ impl ConsumeWorkerMetrics { self.timing_metrics .find_and_send_votes_us .fetch_add(*find_and_send_votes_us, Ordering::Relaxed); - self.timing_metrics.count.fetch_add(1, Ordering::Relaxed); + self.timing_metrics + .commit_count + .fetch_add(1, Ordering::Relaxed); } fn update_on_error_counters( @@ -520,7 +522,7 @@ struct ConsumeWorkerTimingMetrics { find_and_send_votes_us: AtomicU64, wait_for_bank_success_us: AtomicU64, wait_for_bank_failure_us: AtomicU64, - count: AtomicU64, + commit_count: AtomicU64, } impl ConsumeWorkerTimingMetrics { @@ -554,8 +556,8 @@ impl ConsumeWorkerTimingMetrics { i64 ), ( - "load_execute_us_mean", - self.load_execute_us.swap(0, Ordering::Relaxed)/self.count.swap(0, Ordering::Relaxed), + "commit_count", + self.commit_count.swap(0, Ordering::Relaxed), i64 ), (