Skip to content

Commit

Permalink
Remove redundant inc_new_counter's in RpcSubscriptions (#1414)
Browse files Browse the repository at this point in the history
The above datapoint "rpc_subscriptions" reports the same values, and in
general, counters have non-trivial overhead that is hidden within the
macro definition.
  • Loading branch information
steviez authored May 21, 2024
1 parent 8ea3a17 commit 9fc8d17
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions rpc/src/rpc_subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,6 @@ impl RpcSubscriptions {
num_signatures_found.load(Ordering::Relaxed),
num_signatures_notified.load(Ordering::Relaxed),
);
inc_new_counter_info!("rpc-subscription-notify-bank-or-gossip", total_notified);
datapoint_info!(
"rpc_subscriptions",
("source", source, String),
Expand Down Expand Up @@ -1200,22 +1199,6 @@ impl RpcSubscriptions {
),
("notifications_time", total_time.as_us() as i64, i64),
);
inc_new_counter_info!(
"rpc-subscription-counter-num_accounts_notified",
num_accounts_notified.load(Ordering::Relaxed)
);
inc_new_counter_info!(
"rpc-subscription-counter-num_logs_notified",
num_logs_notified.load(Ordering::Relaxed)
);
inc_new_counter_info!(
"rpc-subscription-counter-num_programs_notified",
num_programs_notified.load(Ordering::Relaxed)
);
inc_new_counter_info!(
"rpc-subscription-counter-num_signatures_notified",
num_signatures_notified.load(Ordering::Relaxed)
);
}
}

Expand Down

0 comments on commit 9fc8d17

Please sign in to comment.