diff --git a/accounts-db/src/bucket_map_holder.rs b/accounts-db/src/bucket_map_holder.rs index 8a6fb5028c1060..93e8b5e8ba9e0a 100644 --- a/accounts-db/src/bucket_map_holder.rs +++ b/accounts-db/src/bucket_map_holder.rs @@ -319,9 +319,14 @@ impl + Into> BucketMapHolder let mut throttling_wait_ms = None; loop { if !flush { + let mut m = Measure::start("wait"); self.wait_dirty_or_aged.wait_timeout(Duration::from_millis( self.stats.remaining_until_next_interval(), )); + m.stop(); + self.stats + .bg_waiting_us + .fetch_add(m.as_us(), Ordering::Relaxed); } else if self.should_thread_sleep() || throttling_wait_ms.is_some() { let mut wait = std::cmp::min( self.age_timer