Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Add counter metrics to rpc-subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Nov 14, 2020
1 parent b37d73c commit 67c8995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/rpc_subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ impl RpcSubscriptions {
debug!("slot notify: {:?}", slot_info);
let subscriptions = subscriptions.slot_subscriptions.read().unwrap();
for (_, sink) in subscriptions.iter() {
inc_new_counter_info!("rpc-subscription-notify-slot", 1);
notifier.notify(slot_info, sink);
}
}
Expand All @@ -782,6 +783,7 @@ impl RpcSubscriptions {
debug!("vote notify: {:?}", vote_info);
let subscriptions = subscriptions.vote_subscriptions.read().unwrap();
for (_, sink) in subscriptions.iter() {
inc_new_counter_info!("rpc-subscription-notify-vote", 1);
notifier.notify(
RpcVote {
slots: vote_info.slots.clone(),
Expand All @@ -796,6 +798,7 @@ impl RpcSubscriptions {
debug!("root notify: {:?}", root);
let subscriptions = subscriptions.root_subscriptions.read().unwrap();
for (_, sink) in subscriptions.iter() {
inc_new_counter_info!("rpc-subscription-notify-root", 1);
notifier.notify(root, sink);
}
}
Expand Down Expand Up @@ -936,6 +939,7 @@ impl RpcSubscriptions {
num_signatures_notified,
signatures_time,
);
inc_new_counter_info!("rpc-subscription-notify-bank-or-gossip", total_notified);
datapoint_info!(
"rpc_subscriptions",
("source", source.to_string(), String),
Expand Down

0 comments on commit 67c8995

Please sign in to comment.