From ce4764c8fff051b209a2a61c900ff2a3548dbb46 Mon Sep 17 00:00:00 2001 From: Mariusz Reichert Date: Fri, 5 Apr 2024 11:52:35 +0200 Subject: [PATCH] Additional time measurement --- src/new_index/mempool.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/new_index/mempool.rs b/src/new_index/mempool.rs index fa9131c65..d87bb15fe 100644 --- a/src/new_index/mempool.rs +++ b/src/new_index/mempool.rs @@ -505,6 +505,7 @@ impl Mempool { } pub fn update(mempool: &Arc>, daemon: &Daemon) -> Result<()> { + let t = Instant::now(); let _timer = mempool.read().unwrap().latency.with_label_values(&["update"]).start_timer(); // 1. Determine which transactions are no longer in the daemon's mempool and which ones have newly entered it @@ -540,7 +541,7 @@ impl Mempool { mempool.update_backlog_stats(); } } - + log_fn_duration("mempool::update", t.elapsed().as_micros()); Ok(()) } }