From 8c9fe2fbe5725275953195a51c2242309906c11c Mon Sep 17 00:00:00 2001 From: debris Date: Thu, 10 Dec 2015 15:57:47 +0100 Subject: [PATCH] fixed benches --- benches/trie.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/benches/trie.rs b/benches/trie.rs index a8cd407cf..c12a8f752 100644 --- a/benches/trie.rs +++ b/benches/trie.rs @@ -10,6 +10,8 @@ use test::Bencher; use ethcore_util::hash::*; use ethcore_util::bytes::*; use ethcore_util::trie::*; +use ethcore_util::hashdb::*; +use ethcore_util::memorydb::*; use ethcore_util::triehash::*; use ethcore_util::sha3::*; @@ -51,7 +53,8 @@ fn trie_insertions_six_high(b: &mut Bencher) { } b.iter(||{ - let mut t = TrieDB::new_memory(); + let mut memdb = MemoryDB::new(); + let mut t = TrieDB::new(&mut memdb); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -84,7 +87,8 @@ fn trie_insertions_six_mid(b: &mut Bencher) { d.push((k, v)) } b.iter(||{ - let mut t = TrieDB::new_memory(); + let mut memdb = MemoryDB::new(); + let mut t = TrieDB::new(&mut memdb); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -119,7 +123,8 @@ fn trie_insertions_random_mid(b: &mut Bencher) { } b.iter(||{ - let mut t = TrieDB::new_memory(); + let mut memdb = MemoryDB::new(); + let mut t = TrieDB::new(&mut memdb); for i in d.iter() { t.insert(&i.0, &i.1); } @@ -154,7 +159,8 @@ fn trie_insertions_six_low(b: &mut Bencher) { } b.iter(||{ - let mut t = TrieDB::new_memory(); + let mut memdb = MemoryDB::new(); + let mut t = TrieDB::new(&mut memdb); for i in d.iter() { t.insert(&i.0, &i.1); }