AcctIdx: metric for bucket grow time (#20445)
This commit is contained in:
committed by
GitHub
parent
71ec05e2f6
commit
0d98a91511
@ -39,6 +39,7 @@ pub struct BucketMapHolderStats {
|
|||||||
pub flush_scan_us: AtomicU64,
|
pub flush_scan_us: AtomicU64,
|
||||||
pub flush_update_us: AtomicU64,
|
pub flush_update_us: AtomicU64,
|
||||||
pub flush_remove_us: AtomicU64,
|
pub flush_remove_us: AtomicU64,
|
||||||
|
pub flush_grow_us: AtomicU64,
|
||||||
last_time: AtomicInterval,
|
last_time: AtomicInterval,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,6 +234,11 @@ impl BucketMapHolderStats {
|
|||||||
self.flush_update_us.swap(0, Ordering::Relaxed),
|
self.flush_update_us.swap(0, Ordering::Relaxed),
|
||||||
i64
|
i64
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"flush_grow_us",
|
||||||
|
self.flush_remove_us.swap(0, Ordering::Relaxed),
|
||||||
|
i64
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"flush_remove_us",
|
"flush_remove_us",
|
||||||
self.flush_remove_us.swap(0, Ordering::Relaxed),
|
self.flush_remove_us.swap(0, Ordering::Relaxed),
|
||||||
|
@ -729,7 +729,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let m = Measure::start("flush_remove");
|
let m = Measure::start("flush_remove_or_grow");
|
||||||
match disk_resize {
|
match disk_resize {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
if !self.flush_remove_from_cache(removes, current_age, startup, false) {
|
if !self.flush_remove_from_cache(removes, current_age, startup, false) {
|
||||||
@ -751,6 +751,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
// grow the bucket, outside of all in-mem locks.
|
// grow the bucket, outside of all in-mem locks.
|
||||||
// then, loop to try again
|
// then, loop to try again
|
||||||
disk.grow(err);
|
disk.grow(err);
|
||||||
|
Self::update_time_stat(&self.stats().flush_grow_us, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user