Skip to content

Commit

Permalink
Remove metrics from accounts-db
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiwen-Gao authored and DudessaPr committed Jul 10, 2024
1 parent 401dd54 commit 279da70
Show file tree
Hide file tree
Showing 14 changed files with 1,444 additions and 1,445 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion accounts-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi-macro = { workspace = true, optional = true }
solana-inline-spl = { workspace = true }
solana-measure = { workspace = true }
solana-metrics = { workspace = true }
# solana-metrics = { workspace = true }
solana-nohash-hasher = { workspace = true }
solana-rayon-threadlimit = { workspace = true }
solana-sdk = { workspace = true }
Expand Down
68 changes: 34 additions & 34 deletions accounts-db/src/accounts_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ impl Drop for SlotCacheInner {

impl SlotCacheInner {
pub fn report_slot_store_metrics(&self) {
datapoint_info!(
"slot_repeated_writes",
(
"same_account_writes",
self.same_account_writes.load(Ordering::Relaxed),
i64
),
(
"same_account_writes_size",
self.same_account_writes_size.load(Ordering::Relaxed),
i64
),
(
"unique_account_writes_size",
self.unique_account_writes_size.load(Ordering::Relaxed),
i64
),
("size", self.size.load(Ordering::Relaxed), i64)
);
// datapoint_info!(
// "slot_repeated_writes",
// (
// "same_account_writes",
// self.same_account_writes.load(Ordering::Relaxed),
// i64
// ),
// (
// "same_account_writes_size",
// self.same_account_writes_size.load(Ordering::Relaxed),
// i64
// ),
// (
// "unique_account_writes_size",
// self.unique_account_writes_size.load(Ordering::Relaxed),
// i64
// ),
// ("size", self.size.load(Ordering::Relaxed), i64)
// );
}

pub fn get_all_pubkeys(&self) -> Vec<Pubkey> {
Expand Down Expand Up @@ -191,21 +191,21 @@ impl AccountsCache {
self.total_size.load(Ordering::Relaxed)
}
pub fn report_size(&self) {
datapoint_info!(
"accounts_cache_size",
(
"num_roots",
self.maybe_unflushed_roots.read().unwrap().len(),
i64
),
("num_slots", self.cache.len(), i64),
(
"total_unique_writes_size",
self.unique_account_writes_size(),
i64
),
("total_size", self.size(), i64),
);
// datapoint_info!(
// "accounts_cache_size",
// (
// "num_roots",
// self.maybe_unflushed_roots.read().unwrap().len(),
// i64
// ),
// ("num_slots", self.cache.len(), i64),
// (
// "total_unique_writes_size",
// self.unique_account_writes_size(),
// i64
// ),
// ("total_size", self.size(), i64),
// );
}

pub fn store(&self, slot: Slot, pubkey: &Pubkey, account: AccountSharedData) -> CachedAccount {
Expand Down
Loading

0 comments on commit 279da70

Please sign in to comment.