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 m = Measure::start("entry");
|
||||||
let mut map = self.map().write().unwrap();
|
let mut map = self.map().write().unwrap();
|
||||||
let entry = map.entry(pubkey);
|
let entry = map.entry(pubkey);
|
||||||
let stats = &self.storage.stats;
|
let stats = &self.stats();
|
||||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||||
} else {
|
} else {
|
||||||
|
@ -109,7 +109,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
||||||
let m = Measure::start("entry");
|
let m = Measure::start("entry");
|
||||||
let mut map = self.map().write().unwrap();
|
let mut map = self.map().write().unwrap();
|
||||||
let entry = map.entry(*pubkey);
|
let entry = map.entry(*pubkey);
|
||||||
let stats = &self.storage.stats;
|
let stats = &self.stats();
|
||||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||||
} else {
|
} else {
|
||||||
|
@ -232,7 +232,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
||||||
let m = Measure::start("entry");
|
let m = Measure::start("entry");
|
||||||
let mut map = self.map().write().unwrap();
|
let mut map = self.map().write().unwrap();
|
||||||
let entry = map.entry(pubkey);
|
let entry = map.entry(pubkey);
|
||||||
let stats = &self.storage.stats;
|
let stats = &self.stats();
|
||||||
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
let (count, time) = if matches!(entry, Entry::Occupied(_)) {
|
||||||
(&stats.entries_from_mem, &stats.entry_mem_us)
|
(&stats.entries_from_mem, &stats.entry_mem_us)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue