From 3d2230f1a94c45ae55c2c3c7474d4a75ff039d59 Mon Sep 17 00:00:00 2001 From: sakridge Date: Fri, 5 Jun 2020 09:36:31 -0700 Subject: [PATCH] Add pull request count metrics (#10421) --- core/src/cluster_info.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index ba64b110ed..eded71f699 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -231,6 +231,7 @@ struct GossipStats { epoch_slots_push: Counter, push_message: Counter, new_pull_requests: Counter, + new_pull_requests_count: Counter, mark_pull_request: Counter, skip_pull_response_shred_version: Counter, skip_pull_shred_version: Counter, @@ -1353,6 +1354,9 @@ impl ClusterInfo { .collect() }; self.append_entrypoint_to_pulls(&mut pulls); + self.stats + .new_pull_requests_count + .add_relaxed(pulls.len() as u64); pulls .into_iter() .map(|(peer, filter, gossip, self_info)| { @@ -2112,7 +2116,7 @@ impl ClusterInfo { ), ); datapoint_info!( - "cluster_info_shred_version_skip", + "cluster_info_stats4", ( "skip_push_message_shred_version", self.stats.skip_push_message_shred_version.clear(), @@ -2138,6 +2142,11 @@ impl ClusterInfo { self.stats.push_message_value_count.clear(), i64 ), + ( + "new_pull_requests_count", + self.stats.new_pull_requests_count.clear(), + i64 + ), ); *last_print = Instant::now();