AcctIdx: don't log disk stats when disk isn't enabled (#21371)
This commit is contained in:
parent
87831e7f8d
commit
a762066310
|
@ -173,6 +173,7 @@ impl BucketMapHolderStats {
|
|||
|
||||
// sum of elapsed time in each thread
|
||||
let mut thread_time_elapsed_ms = elapsed_ms * storage.threads as u64;
|
||||
if disk.is_some() {
|
||||
datapoint_info!(
|
||||
if startup || was_startup {
|
||||
thread_time_elapsed_ms *= 2; // more threads are allocated during startup
|
||||
|
@ -410,5 +411,100 @@ impl BucketMapHolderStats {
|
|||
i64
|
||||
),
|
||||
);
|
||||
} else {
|
||||
datapoint_info!(
|
||||
if startup || was_startup {
|
||||
thread_time_elapsed_ms *= 2; // more threads are allocated during startup
|
||||
"accounts_index_startup"
|
||||
} else {
|
||||
"accounts_index"
|
||||
},
|
||||
(
|
||||
"count_in_mem",
|
||||
self.count_in_mem.load(Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
("count", self.count.load(Ordering::Relaxed), i64),
|
||||
(
|
||||
"bg_waiting_percent",
|
||||
Self::calc_percent(
|
||||
self.bg_waiting_us.swap(0, Ordering::Relaxed) / US_PER_MS,
|
||||
thread_time_elapsed_ms
|
||||
),
|
||||
f64
|
||||
),
|
||||
(
|
||||
"bg_throttling_wait_percent",
|
||||
Self::calc_percent(
|
||||
self.bg_throttling_wait_us.swap(0, Ordering::Relaxed) / US_PER_MS,
|
||||
thread_time_elapsed_ms
|
||||
),
|
||||
f64
|
||||
),
|
||||
("min_in_bin_mem", in_mem_stats.0, i64),
|
||||
("max_in_bin_mem", in_mem_stats.1, i64),
|
||||
("count_from_bins_mem", in_mem_stats.2, i64),
|
||||
("median_from_bins_mem", in_mem_stats.3, i64),
|
||||
(
|
||||
"gets_from_mem",
|
||||
self.gets_from_mem.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"get_mem_us",
|
||||
self.get_mem_us.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"gets_missing",
|
||||
self.gets_missing.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"get_missing_us",
|
||||
self.get_missing_us.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"entries_from_mem",
|
||||
self.entries_from_mem.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"entry_mem_us",
|
||||
self.entry_mem_us.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"entries_missing",
|
||||
self.entries_missing.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"entry_missing_us",
|
||||
self.entry_missing_us.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"updates_in_mem",
|
||||
self.updates_in_mem.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
(
|
||||
"get_range_us",
|
||||
self.get_range_us.swap(0, Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
("inserts", self.inserts.swap(0, Ordering::Relaxed), i64),
|
||||
("deletes", self.deletes.swap(0, Ordering::Relaxed), i64),
|
||||
(
|
||||
"active_threads",
|
||||
self.active_threads.load(Ordering::Relaxed),
|
||||
i64
|
||||
),
|
||||
("items", self.items.swap(0, Ordering::Relaxed), i64),
|
||||
("keys", self.keys.swap(0, Ordering::Relaxed), i64),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue