diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index 9f23169c55f512..239c5ca5b84595 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -308,6 +308,7 @@ impl ClusterInfo { } pub fn save_contact_info(&self) { + let _st = ScopedTimer::from(&self.stats.save_contact_info_time); let nodes = { let entrypoint_gossip_addrs = self .entrypoints diff --git a/gossip/src/cluster_info_metrics.rs b/gossip/src/cluster_info_metrics.rs index 9be73f19759979..b6faced039e1ea 100644 --- a/gossip/src/cluster_info_metrics.rs +++ b/gossip/src/cluster_info_metrics.rs @@ -171,6 +171,7 @@ pub struct GossipStats { pub(crate) push_vote_read: Counter, pub(crate) repair_peers: Counter, pub(crate) require_stake_for_gossip_unknown_stakes: Counter, + pub(crate) save_contact_info_time: Counter, pub(crate) skip_pull_response_shred_version: Counter, pub(crate) skip_pull_shred_version: Counter, pub(crate) skip_push_message_shred_version: Counter, @@ -318,6 +319,11 @@ pub(crate) fn submit_gossip_stats( stats.push_response_count.clear(), i64 ), + ( + "save_contact_info_time", + stats.save_contact_info_time.clear(), + i64 + ), ); datapoint_info!( "cluster_info_stats3",