i/o stats for backend databases (#4525)

This commit is contained in:
Nikolay Volf
2020-01-07 21:53:03 +03:00
committed by GitHub
parent 9500eb7590
commit df4058b556
16 changed files with 245 additions and 55 deletions
+3 -2
View File
@@ -29,6 +29,7 @@ use crate::{
Backend as BlockchainBackend, well_known_cache_keys
},
light::RemoteBlockchain,
UsageInfo,
};
use sp_blockchain;
use sp_consensus::BlockOrigin;
@@ -261,8 +262,8 @@ pub trait Backend<Block, H>: AuxStore + Send + Sync where
/// Returns reference to blockchain backend.
fn blockchain(&self) -> &Self::Blockchain;
/// Returns the used state cache, if existent.
fn used_state_cache_size(&self) -> Option<usize>;
/// Returns current usage statistics.
fn usage_info(&self) -> Option<UsageInfo>;
/// Returns reference to changes trie storage.
fn changes_trie_storage(&self) -> Option<&Self::ChangesTrieStorage>;