State metrics possible changes (#5168)

* Registering state from overlay.

* fix

* fix2

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
cheme
2020-04-01 19:46:40 +02:00
committed by GitHub
parent a8aedfa16f
commit 58578af074
17 changed files with 232 additions and 33 deletions
@@ -20,6 +20,7 @@ use crate::{
StorageKey, StorageValue, StorageCollection,
trie_backend::TrieBackend,
backend::{Backend, insert_into_memory_db},
stats::UsageInfo,
};
use std::{error, fmt, collections::{BTreeMap, HashMap}, marker::PhantomData, ops};
use hash_db::Hasher;
@@ -357,6 +358,12 @@ impl<H: Hasher> Backend<H> for InMemory<H> where H::Out: Codec {
self.trie = Some(TrieBackend::new(mdb, root));
self.trie.as_ref()
}
fn register_overlay_stats(&mut self, _stats: &crate::stats::StateMachineStats) { }
fn usage_info(&self) -> UsageInfo {
UsageInfo::empty()
}
}
#[cfg(test)]