|
1 | 1 | use { |
2 | 2 | super::{ |
3 | 3 | leader_slot_timing_metrics::{LeaderExecuteAndCommitTimings, LeaderSlotTimingMetrics}, |
| 4 | + packet_deserializer::PacketReceiverStats, |
4 | 5 | unprocessed_transaction_storage::InsertPacketBatchSummary, |
5 | 6 | }, |
6 | 7 | solana_accounts_db::transaction_error_metrics::*, |
@@ -64,6 +65,21 @@ struct LeaderSlotPacketCountMetrics { |
64 | 65 | // total number of packets TPU received from sigverify that failed signature verification. |
65 | 66 | newly_failed_sigverify_count: u64, |
66 | 67 |
|
| 68 | + // total number of packets filtered due to sanitization failures during receiving from sigverify |
| 69 | + failed_sanitization_count: u64, |
| 70 | + |
| 71 | + // total number of packets filtered due to prioritization failures during receiving from sigverify |
| 72 | + failed_prioritization_count: u64, |
| 73 | + |
| 74 | + // total number of packets filtered due to insufficient compute limits during receiving from sigverify |
| 75 | + insufficient_compute_limit_count: u64, |
| 76 | + |
| 77 | + // total number of packets filtered due to excessive precompile signatures during receiving from sigverify |
| 78 | + excessive_precompile_count: u64, |
| 79 | + |
| 80 | + // total number of invalid vote packets filtered out during receiving from sigverify |
| 81 | + invalid_votes_count: u64, |
| 82 | + |
67 | 83 | // total number of dropped packet due to the thread's buffered packets capacity being reached. |
68 | 84 | exceeded_buffer_limit_dropped_packets_count: u64, |
69 | 85 |
|
@@ -148,111 +164,124 @@ impl LeaderSlotPacketCountMetrics { |
148 | 164 | fn report(&self, id: u32, slot: Slot) { |
149 | 165 | datapoint_info!( |
150 | 166 | "banking_stage-leader_slot_packet_counts", |
151 | | - ("id", id as i64, i64), |
152 | | - ("slot", slot as i64, i64), |
| 167 | + ("id", id, i64), |
| 168 | + ("slot", slot, i64), |
| 169 | + ("total_new_valid_packets", self.total_new_valid_packets, i64), |
153 | 170 | ( |
154 | | - "total_new_valid_packets", |
155 | | - self.total_new_valid_packets as i64, |
| 171 | + "newly_failed_sigverify_count", |
| 172 | + self.newly_failed_sigverify_count, |
156 | 173 | i64 |
157 | 174 | ), |
158 | 175 | ( |
159 | | - "newly_failed_sigverify_count", |
160 | | - self.newly_failed_sigverify_count as i64, |
| 176 | + "failed_sanitization_count", |
| 177 | + self.failed_sanitization_count, |
161 | 178 | i64 |
162 | 179 | ), |
| 180 | + ( |
| 181 | + "failed_prioritization_count", |
| 182 | + self.failed_prioritization_count, |
| 183 | + i64 |
| 184 | + ), |
| 185 | + ( |
| 186 | + "insufficient_compute_limit_count", |
| 187 | + self.insufficient_compute_limit_count, |
| 188 | + i64 |
| 189 | + ), |
| 190 | + ( |
| 191 | + "excessive_precompile_count", |
| 192 | + self.excessive_precompile_count, |
| 193 | + i64 |
| 194 | + ), |
| 195 | + ("invalid_votes_count", self.invalid_votes_count, i64), |
163 | 196 | ( |
164 | 197 | "exceeded_buffer_limit_dropped_packets_count", |
165 | | - self.exceeded_buffer_limit_dropped_packets_count as i64, |
| 198 | + self.exceeded_buffer_limit_dropped_packets_count, |
166 | 199 | i64 |
167 | 200 | ), |
168 | 201 | ( |
169 | 202 | "newly_buffered_packets_count", |
170 | | - self.newly_buffered_packets_count as i64, |
| 203 | + self.newly_buffered_packets_count, |
171 | 204 | i64 |
172 | 205 | ), |
173 | 206 | ( |
174 | 207 | "retryable_packets_filtered_count", |
175 | | - self.retryable_packets_filtered_count as i64, |
| 208 | + self.retryable_packets_filtered_count, |
176 | 209 | i64 |
177 | 210 | ), |
178 | 211 | ( |
179 | 212 | "transactions_attempted_execution_count", |
180 | | - self.transactions_attempted_execution_count as i64, |
| 213 | + self.transactions_attempted_execution_count, |
181 | 214 | i64 |
182 | 215 | ), |
183 | 216 | ( |
184 | 217 | "committed_transactions_count", |
185 | | - self.committed_transactions_count as i64, |
| 218 | + self.committed_transactions_count, |
186 | 219 | i64 |
187 | 220 | ), |
188 | 221 | ( |
189 | 222 | "committed_transactions_with_successful_result_count", |
190 | | - self.committed_transactions_with_successful_result_count as i64, |
| 223 | + self.committed_transactions_with_successful_result_count, |
191 | 224 | i64 |
192 | 225 | ), |
193 | 226 | ( |
194 | 227 | "retryable_errored_transaction_count", |
195 | | - self.retryable_errored_transaction_count as i64, |
196 | | - i64 |
197 | | - ), |
198 | | - ( |
199 | | - "retryable_packets_count", |
200 | | - self.retryable_packets_count as i64, |
| 228 | + self.retryable_errored_transaction_count, |
201 | 229 | i64 |
202 | 230 | ), |
| 231 | + ("retryable_packets_count", self.retryable_packets_count, i64), |
203 | 232 | ( |
204 | 233 | "nonretryable_errored_transactions_count", |
205 | | - self.nonretryable_errored_transactions_count as i64, |
| 234 | + self.nonretryable_errored_transactions_count, |
206 | 235 | i64 |
207 | 236 | ), |
208 | 237 | ( |
209 | 238 | "executed_transactions_failed_commit_count", |
210 | | - self.executed_transactions_failed_commit_count as i64, |
| 239 | + self.executed_transactions_failed_commit_count, |
211 | 240 | i64 |
212 | 241 | ), |
213 | 242 | ( |
214 | 243 | "account_lock_throttled_transactions_count", |
215 | | - self.account_lock_throttled_transactions_count as i64, |
| 244 | + self.account_lock_throttled_transactions_count, |
216 | 245 | i64 |
217 | 246 | ), |
218 | 247 | ( |
219 | 248 | "account_locks_limit_throttled_transactions_count", |
220 | | - self.account_locks_limit_throttled_transactions_count as i64, |
| 249 | + self.account_locks_limit_throttled_transactions_count, |
221 | 250 | i64 |
222 | 251 | ), |
223 | 252 | ( |
224 | 253 | "cost_model_throttled_transactions_count", |
225 | | - self.cost_model_throttled_transactions_count as i64, |
| 254 | + self.cost_model_throttled_transactions_count, |
226 | 255 | i64 |
227 | 256 | ), |
228 | 257 | ( |
229 | 258 | "failed_forwarded_packets_count", |
230 | | - self.failed_forwarded_packets_count as i64, |
| 259 | + self.failed_forwarded_packets_count, |
231 | 260 | i64 |
232 | 261 | ), |
233 | 262 | ( |
234 | 263 | "successful_forwarded_packets_count", |
235 | | - self.successful_forwarded_packets_count as i64, |
| 264 | + self.successful_forwarded_packets_count, |
236 | 265 | i64 |
237 | 266 | ), |
238 | 267 | ( |
239 | 268 | "packet_batch_forward_failure_count", |
240 | | - self.packet_batch_forward_failure_count as i64, |
| 269 | + self.packet_batch_forward_failure_count, |
241 | 270 | i64 |
242 | 271 | ), |
243 | 272 | ( |
244 | 273 | "cleared_from_buffer_after_forward_count", |
245 | | - self.cleared_from_buffer_after_forward_count as i64, |
| 274 | + self.cleared_from_buffer_after_forward_count, |
246 | 275 | i64 |
247 | 276 | ), |
248 | 277 | ( |
249 | 278 | "forwardable_batches_count", |
250 | | - self.forwardable_batches_count as i64, |
| 279 | + self.forwardable_batches_count, |
251 | 280 | i64 |
252 | 281 | ), |
253 | 282 | ( |
254 | 283 | "end_of_slot_unprocessed_buffer_len", |
255 | | - self.end_of_slot_unprocessed_buffer_len as i64, |
| 284 | + self.end_of_slot_unprocessed_buffer_len, |
256 | 285 | i64 |
257 | 286 | ), |
258 | 287 | ); |
@@ -559,24 +588,34 @@ impl LeaderSlotMetricsTracker { |
559 | 588 | } |
560 | 589 |
|
561 | 590 | // Packet inflow/outflow/processing metrics |
562 | | - pub(crate) fn increment_total_new_valid_packets(&mut self, count: u64) { |
| 591 | + pub(crate) fn increment_received_packet_counts(&mut self, stats: PacketReceiverStats) { |
563 | 592 | if let Some(leader_slot_metrics) = &mut self.leader_slot_metrics { |
| 593 | + let metrics = &mut leader_slot_metrics.packet_count_metrics; |
| 594 | + let PacketReceiverStats { |
| 595 | + passed_sigverify_count, |
| 596 | + failed_sigverify_count, |
| 597 | + invalid_vote_count, |
| 598 | + failed_prioritization_count, |
| 599 | + failed_sanitization_count, |
| 600 | + excessive_precompile_count, |
| 601 | + insufficient_compute_limit_count, |
| 602 | + } = stats; |
| 603 | + |
| 604 | + saturating_add_assign!(metrics.total_new_valid_packets, passed_sigverify_count); |
| 605 | + saturating_add_assign!(metrics.newly_failed_sigverify_count, failed_sigverify_count); |
| 606 | + saturating_add_assign!(metrics.invalid_votes_count, invalid_vote_count); |
564 | 607 | saturating_add_assign!( |
565 | | - leader_slot_metrics |
566 | | - .packet_count_metrics |
567 | | - .total_new_valid_packets, |
568 | | - count |
| 608 | + metrics.failed_prioritization_count, |
| 609 | + failed_prioritization_count |
569 | 610 | ); |
570 | | - } |
571 | | - } |
572 | | - |
573 | | - pub(crate) fn increment_newly_failed_sigverify_count(&mut self, count: u64) { |
574 | | - if let Some(leader_slot_metrics) = &mut self.leader_slot_metrics { |
| 611 | + saturating_add_assign!(metrics.failed_sanitization_count, failed_sanitization_count); |
575 | 612 | saturating_add_assign!( |
576 | | - leader_slot_metrics |
577 | | - .packet_count_metrics |
578 | | - .newly_failed_sigverify_count, |
579 | | - count |
| 613 | + metrics.excessive_precompile_count, |
| 614 | + excessive_precompile_count |
| 615 | + ); |
| 616 | + saturating_add_assign!( |
| 617 | + metrics.insufficient_compute_limit_count, |
| 618 | + insufficient_compute_limit_count |
580 | 619 | ); |
581 | 620 | } |
582 | 621 | } |
|
0 commit comments