Add incoming pull response counter (#11591)
This commit is contained in:
@ -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,11 +1690,16 @@ impl ClusterInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// process the collected pulls together
|
// process the collected pulls together
|
||||||
|
if !gossip_pull_data.is_empty() {
|
||||||
|
self.stats
|
||||||
|
.pull_requests_count
|
||||||
|
.add_relaxed(gossip_pull_data.len() as u64);
|
||||||
let rsp = self.handle_pull_requests(recycler, gossip_pull_data, stakes);
|
let rsp = self.handle_pull_requests(recycler, gossip_pull_data, stakes);
|
||||||
if let Some(rsp) = rsp {
|
if let Some(rsp) = rsp {
|
||||||
let _ignore_disconnect = response_sender.send(rsp);
|
let _ignore_disconnect = response_sender.send(rsp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn update_data_budget(&self, stakes: &HashMap<Pubkey, u64>) {
|
fn update_data_budget(&self, stakes: &HashMap<Pubkey, u64>) {
|
||||||
let mut w_outbound_budget = self.outbound_budget.write().unwrap();
|
let mut w_outbound_budget = self.outbound_budget.write().unwrap();
|
||||||
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user