|
1 | 1 | use apollo_mempool::metrics::{ |
2 | 2 | LABEL_NAME_DROP_REASON, |
| 3 | + MEMPOOL_ACCOUNTS_WITH_GAP, |
3 | 4 | MEMPOOL_DELAYED_DECLARES_SIZE, |
4 | 5 | MEMPOOL_PENDING_QUEUE_SIZE, |
5 | 6 | MEMPOOL_POOL_SIZE, |
6 | 7 | MEMPOOL_PRIORITY_QUEUE_SIZE, |
| 8 | + MEMPOOL_STUCK_TXS, |
7 | 9 | MEMPOOL_TOTAL_SIZE_BYTES, |
8 | 10 | MEMPOOL_TRANSACTIONS_COMMITTED, |
9 | 11 | MEMPOOL_TRANSACTIONS_DROPPED, |
@@ -97,6 +99,26 @@ fn get_panel_mempool_delayed_declares_size() -> Panel { |
97 | 99 | PanelType::TimeSeries, |
98 | 100 | ) |
99 | 101 | } |
| 102 | +fn get_panel_mempool_accounts_with_gap() -> Panel { |
| 103 | + Panel::new( |
| 104 | + "Accounts With Nonce Gap", |
| 105 | + "Number of accounts whose lowest pool nonce exceeds the account nonce, making them unable \ |
| 106 | + to provide any transaction for batching", |
| 107 | + MEMPOOL_ACCOUNTS_WITH_GAP.get_name_with_filter().to_string(), |
| 108 | + PanelType::TimeSeries, |
| 109 | + ) |
| 110 | + .with_log_query("has a nonce gap") |
| 111 | +} |
| 112 | +fn get_panel_mempool_stuck_txs() -> Panel { |
| 113 | + Panel::new( |
| 114 | + "Stuck Transactions (Nonce Gap)", |
| 115 | + "Number of transactions in the pool belonging to accounts whose lowest pool nonce exceeds \ |
| 116 | + the account nonce", |
| 117 | + MEMPOOL_STUCK_TXS.get_name_with_filter().to_string(), |
| 118 | + PanelType::TimeSeries, |
| 119 | + ) |
| 120 | + .with_log_query("has a nonce gap") |
| 121 | +} |
100 | 122 | fn get_panel_mempool_transaction_time_spent_until_batched() -> Panel { |
101 | 123 | Panel::from_hist( |
102 | 124 | &TRANSACTION_TIME_SPENT_UNTIL_BATCHED, |
@@ -126,6 +148,8 @@ pub(crate) fn get_mempool_row() -> Row { |
126 | 148 | get_panel_mempool_priority_queue_size(), |
127 | 149 | get_panel_mempool_pending_queue_size(), |
128 | 150 | get_panel_mempool_delayed_declares_size(), |
| 151 | + get_panel_mempool_accounts_with_gap(), |
| 152 | + get_panel_mempool_stuck_txs(), |
129 | 153 | get_panel_mempool_transaction_time_spent_until_batched(), |
130 | 154 | get_panel_mempool_transaction_time_spent_until_committed(), |
131 | 155 | ], |
|
0 commit comments