AcctIdx: metric for bucket grow time (#20445)

This commit is contained in:
Jeff Washington (jwash)
2021-10-05 15:22:01 -05:00
committed by GitHub
parent 71ec05e2f6
commit 0d98a91511
2 changed files with 8 additions and 1 deletions

View File

@@ -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 {
Ok(_) => {
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.
// then, loop to try again
disk.grow(err);
Self::update_time_stat(&self.stats().flush_grow_us, m);
}
}
}