Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
metrics to distinguish why repair packets are dropped (#27960)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbiseda authored Sep 25, 2022
1 parent 060ecf9 commit 9816c94
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions core/src/serve_repair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 9816c94

Please sign in to comment.