Add incoming pull response counter (#11591)

This commit is contained in:
sakridge
2020-08-12 14:07:05 -07:00
committed by GitHub
parent bb8ccbb022
commit 54137e3446

View File

@ -242,6 +242,7 @@ struct GossipStats {
push_message_count: Counter, push_message_count: Counter,
push_message_value_count: Counter, push_message_value_count: Counter,
push_response_count: Counter, push_response_count: Counter,
pull_requests_count: Counter,
} }
pub struct ClusterInfo { pub struct ClusterInfo {
@ -1689,9 +1690,14 @@ impl ClusterInfo {
} }
// process the collected pulls together // process the collected pulls together
let rsp = self.handle_pull_requests(recycler, gossip_pull_data, stakes); if !gossip_pull_data.is_empty() {
if let Some(rsp) = rsp { self.stats
let _ignore_disconnect = response_sender.send(rsp); .pull_requests_count
.add_relaxed(gossip_pull_data.len() as u64);
let rsp = self.handle_pull_requests(recycler, gossip_pull_data, stakes);
if let Some(rsp) = rsp {
let _ignore_disconnect = response_sender.send(rsp);
}
} }
} }
@ -2256,6 +2262,14 @@ impl ClusterInfo {
i64 i64
), ),
); );
datapoint_info!(
"cluster_info_stats5",
(
"pull_requests_count",
self.stats.pull_requests_count.clear(),
i64
),
);
*last_print = Instant::now(); *last_print = Instant::now();
} }