Drop system cache for trie benchmarks (#7242)

* add system clear cache

* move to shared

* rearrange a little-a

* add few tricks also

* use tempdir for buf as well

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Nikolay Volf
2020-10-07 15:14:14 +03:00
committed by GitHub
parent 601e2fa139
commit add7c9ed5b
2 changed files with 63 additions and 0 deletions
+1
View File
@@ -178,6 +178,7 @@ impl sp_state_machine::Storage<sp_core::Blake2Hasher> for Storage {
impl core::Benchmark for TrieReadBenchmark {
fn run(&mut self, mode: Mode) -> std::time::Duration {
let mut db = self.database.clone();
let storage: Arc<dyn sp_state_machine::Storage<sp_core::Blake2Hasher>> =
Arc::new(Storage(db.open(self.database_type)));