mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Expose state-db memory info (#5110)
This exposes memory statistics from the state-db.
This commit is contained in:
@@ -31,6 +31,7 @@ const LAST_PRUNED: &[u8] = b"last_pruned";
|
||||
const PRUNING_JOURNAL: &[u8] = b"pruning_journal";
|
||||
|
||||
/// See module documentation.
|
||||
#[derive(parity_util_mem_derive::MallocSizeOf)]
|
||||
pub struct RefWindow<BlockHash: Hash, Key: Hash> {
|
||||
/// A queue of keys that should be deleted for each block in the pruning window.
|
||||
death_rows: VecDeque<DeathRow<BlockHash, Key>>,
|
||||
@@ -46,7 +47,7 @@ pub struct RefWindow<BlockHash: Hash, Key: Hash> {
|
||||
pending_prunings: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq, parity_util_mem_derive::MallocSizeOf)]
|
||||
struct DeathRow<BlockHash: Hash, Key: Hash> {
|
||||
hash: BlockHash,
|
||||
journal_key: Vec<u8>,
|
||||
|
||||
Reference in New Issue
Block a user