Add pull request count metrics (#10421)

This commit is contained in:
sakridge 2020-06-05 09:36:31 -07:00 committed by GitHub
parent 31e20eff82
commit 3d2230f1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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();