Skip to content

Commit ebc9312

Browse files
committed
report mempool fetched and missing counts to prometheus
1 parent 4878e0a commit ebc9312

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/new_index/mempool.rs

+9
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,15 @@ impl Mempool {
526526
indexed_txids.len() + fetched_txs.len(),
527527
new_txids.len()
528528
);
529+
530+
{
531+
let mempool = mempool.read().unwrap();
532+
533+
mempool.count.with_label_values(&["all_txs"]).set(all_txids.len() as f64);
534+
mempool.count.with_label_values(&["fetched_txs"]).set((indexed_txids.len() + fetched_txs.len()) as f64);
535+
mempool.count.with_label_values(&["missing_txs"]).set(new_txids.len() as f64);
536+
}
537+
529538
let new_txs = daemon.gettransactions_available(&new_txids)?;
530539

531540
// Abort if the chain tip moved while fetching transactions

0 commit comments

Comments
 (0)