Adds cache_hash_data_us to HashStats (#32371)
This commit is contained in:
parent
9731331be4
commit
f1f0f451b7
|
@ -7616,7 +7616,12 @@ impl AccountsDb {
|
||||||
let slot = storages.max_slot_inclusive();
|
let slot = storages.max_slot_inclusive();
|
||||||
let use_bg_thread_pool = config.use_bg_thread_pool;
|
let use_bg_thread_pool = config.use_bg_thread_pool;
|
||||||
let scan_and_hash = || {
|
let scan_and_hash = || {
|
||||||
let cache_hash_data = Self::get_cache_hash_data(accounts_hash_cache_path, config, slot);
|
let (cache_hash_data, cache_hash_data_us) = measure_us!(Self::get_cache_hash_data(
|
||||||
|
accounts_hash_cache_path,
|
||||||
|
config,
|
||||||
|
slot
|
||||||
|
));
|
||||||
|
stats.cache_hash_data_us += cache_hash_data_us;
|
||||||
|
|
||||||
let bounds = Range {
|
let bounds = Range {
|
||||||
start: 0,
|
start: 0,
|
||||||
|
|
|
@ -139,6 +139,7 @@ pub type StorageSizeQuartileStats = [usize; 6];
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct HashStats {
|
pub struct HashStats {
|
||||||
pub mark_time_us: u64,
|
pub mark_time_us: u64,
|
||||||
|
pub cache_hash_data_us: u64,
|
||||||
pub scan_time_total_us: u64,
|
pub scan_time_total_us: u64,
|
||||||
pub zeros_time_total_us: u64,
|
pub zeros_time_total_us: u64,
|
||||||
pub hash_time_total_us: u64,
|
pub hash_time_total_us: u64,
|
||||||
|
@ -193,6 +194,7 @@ impl HashStats {
|
||||||
// NOTE: Purposely do *not* include `sort_time_total_us` in `total_time_us`, since it is
|
// NOTE: Purposely do *not* include `sort_time_total_us` in `total_time_us`, since it is
|
||||||
// overlapping parallel scans, which is not the wallclock time.
|
// overlapping parallel scans, which is not the wallclock time.
|
||||||
let total_time_us = self.mark_time_us
|
let total_time_us = self.mark_time_us
|
||||||
|
+ self.cache_hash_data_us
|
||||||
+ self.scan_time_total_us
|
+ self.scan_time_total_us
|
||||||
+ self.zeros_time_total_us
|
+ self.zeros_time_total_us
|
||||||
+ self.hash_time_total_us
|
+ self.hash_time_total_us
|
||||||
|
@ -201,6 +203,7 @@ impl HashStats {
|
||||||
datapoint_info!(
|
datapoint_info!(
|
||||||
"calculate_accounts_hash_from_storages",
|
"calculate_accounts_hash_from_storages",
|
||||||
("mark_time_us", self.mark_time_us, i64),
|
("mark_time_us", self.mark_time_us, i64),
|
||||||
|
("cache_hash_data_us", self.cache_hash_data_us, i64),
|
||||||
("accounts_scan_us", self.scan_time_total_us, i64),
|
("accounts_scan_us", self.scan_time_total_us, i64),
|
||||||
("eliminate_zeros_us", self.zeros_time_total_us, i64),
|
("eliminate_zeros_us", self.zeros_time_total_us, i64),
|
||||||
("hash_us", self.hash_time_total_us, i64),
|
("hash_us", self.hash_time_total_us, i64),
|
||||||
|
|
Loading…
Reference in New Issue