metrics to distinguish why repair packets are dropped (#27960)

This commit is contained in:
Jeff Biseda 2022-09-24 23:20:05 -07:00 committed by GitHub
parent 060ecf9cdb
commit 9816c94d7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 4 deletions

View File

@ -152,7 +152,8 @@ impl RequestResponse for AncestorHashesRepairType {
struct ServeRepairStats {
total_requests: usize,
unsigned_requests: usize,
dropped_requests: usize,
dropped_requests_outbound_bandwidth: usize,
dropped_requests_load_shed: usize,
total_dropped_response_packets: usize,
total_response_packets: usize,
total_response_bytes: usize,
@ -469,7 +470,7 @@ impl ServeRepair {
}
}
stats.dropped_requests += dropped_requests;
stats.dropped_requests_load_shed += dropped_requests;
stats.total_requests += total_requests;
let root_bank = self.bank_forks.read().unwrap().root_bank();
@ -502,7 +503,16 @@ impl ServeRepair {
"serve_repair-requests_received",
("total_requests", stats.total_requests, i64),
("unsigned_requests", stats.unsigned_requests, i64),
("dropped_requests", stats.dropped_requests, i64),
(
"dropped_requests_outbound_bandwidth",
stats.dropped_requests_outbound_bandwidth,
i64
),
(
"dropped_requests_load_shed",
stats.dropped_requests_load_shed,
i64
),
(
"total_dropped_response_packets",
stats.total_dropped_response_packets,
@ -695,7 +705,7 @@ impl ServeRepair {
stats.total_response_bytes += num_response_bytes;
stats.total_response_packets += num_response_packets;
} else {
stats.dropped_requests += packet_batch.len() - i;
stats.dropped_requests_outbound_bandwidth += packet_batch.len() - i;
stats.total_dropped_response_packets += num_response_packets;
break;
}