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
+5 -1
View File
@@ -32,7 +32,8 @@ use sp_blockchain::{
HeaderMetadata, well_known_cache_keys, HeaderBackend, Cache as BlockchainCache,
Error as ClientError, Result as ClientResult,
};
use crate::backend::{ AuxStore, NewBlockState };
use crate::{backend::{AuxStore, NewBlockState}, UsageInfo};
/// Remote call request.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct RemoteCallRequest<Header: HeaderT> {
@@ -274,6 +275,9 @@ pub trait Storage<Block: BlockT>: AuxStore + HeaderBackend<Block> + HeaderMetada
/// Get storage cache.
fn cache(&self) -> Option<Arc<dyn BlockchainCache<Block>>>;
/// Get storage usage statistics.
fn usage_info(&self) -> Option<UsageInfo>;
}
/// Remote header.