From 627a5db0975a08f344fa36c797fcf4458efd5244 Mon Sep 17 00:00:00 2001 From: jeff washington Date: Wed, 22 Mar 2023 11:20:34 -0500 Subject: [PATCH] add stat for disk buckets flushed --- runtime/src/bucket_map_holder_stats.rs | 6 ++++++ runtime/src/in_mem_accounts_index.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/runtime/src/bucket_map_holder_stats.rs b/runtime/src/bucket_map_holder_stats.rs index 11404a48587e37..abbe208d4593d6 100644 --- a/runtime/src/bucket_map_holder_stats.rs +++ b/runtime/src/bucket_map_holder_stats.rs @@ -41,6 +41,7 @@ pub struct BucketMapHolderStats { pub failed_to_evict: AtomicU64, pub keys: AtomicU64, pub deletes: AtomicU64, + pub buckets_scanned: AtomicU64, pub inserts: AtomicU64, count: AtomicUsize, pub bg_waiting_us: AtomicU64, @@ -372,6 +373,11 @@ impl BucketMapHolderStats { ("items", self.items.swap(0, Ordering::Relaxed), i64), ("keys", self.keys.swap(0, Ordering::Relaxed), i64), ("ms_per_age", ms_per_age, i64), + ( + "buckets_scanned", + self.buckets_scanned.swap(0, Ordering::Relaxed), + i64 + ), ( "flush_scan_us", self.flush_scan_us.swap(0, Ordering::Relaxed), diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 7ab9847856c381..3663540b6c4517 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -1109,6 +1109,7 @@ impl + Into> InMemAccountsIndex