Skip to content

Commit

Permalink
Directly send the commit_count instead of computing the mean
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolana committed Oct 28, 2024
1 parent d19f6be commit 7240bb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/banking_stage/consume_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ 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(
Expand Down Expand Up @@ -520,7 +520,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 {
Expand Down Expand Up @@ -554,8 +554,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
),
(
Expand Down

0 comments on commit 7240bb3

Please sign in to comment.