AcctIdx: use stats() accessor (#19890)
This commit is contained in:
parent
691bea8776
commit
d3c80be7d5
|
@ -80,7 +80,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||
let m = Measure::start("entry");
|
||||
let mut map = self.map().write().unwrap();
|
||||
let entry = map.entry(pubkey);
|
||||
let stats = &self.storage.stats;
|
||||
let stats = &self.stats();
|
||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||
} else {
|
||||
|
@ -109,7 +109,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||
let m = Measure::start("entry");
|
||||
let mut map = self.map().write().unwrap();
|
||||
let entry = map.entry(*pubkey);
|
||||
let stats = &self.storage.stats;
|
||||
let stats = &self.stats();
|
||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||
} else {
|
||||
|
@ -232,7 +232,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||
let m = Measure::start("entry");
|
||||
let mut map = self.map().write().unwrap();
|
||||
let entry = map.entry(pubkey);
|
||||
let stats = &self.storage.stats;
|
||||
let stats = &self.stats();
|
||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue