Skip to content

Commit

Permalink
Additional time measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reichert committed Apr 5, 2024
1 parent dd4c148 commit ce4764c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/new_index/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ impl Mempool {
}

pub fn update(mempool: &Arc<RwLock<Mempool>>, 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
Expand Down Expand Up @@ -540,7 +541,7 @@ impl Mempool {
mempool.update_backlog_stats();
}
}

log_fn_duration("mempool::update", t.elapsed().as_micros());
Ok(())
}
}
Expand Down

0 comments on commit ce4764c

Please sign in to comment.