fixed benches
This commit is contained in:
parent
4210b957ac
commit
8c9fe2fbe5
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user