Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hash256-std-hasher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ harness = false
crunchy = "0.2.1"

[dev-dependencies]
criterion = "0.3.3"
criterion = "0.4.0"

[features]
default = ["std"]
Expand Down
12 changes: 4 additions & 8 deletions hash256-std-hasher/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#[macro_use]
extern crate criterion;
use criterion::{black_box, Criterion};
criterion_group!(benches, write_hash256_std_hasher, write_default_hasher);
criterion_main!(benches);

extern crate hash256_std_hasher;

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hash256_std_hasher::Hash256StdHasher;
use std::{collections::hash_map::DefaultHasher, hash::Hasher};

criterion_group!(benches, write_hash256_std_hasher, write_default_hasher);
criterion_main!(benches);

fn write_hash256_std_hasher(b: &mut Criterion) {
b.bench_function("write_hash256_std_hasher", |b| {
b.iter(|| {
Expand Down
2 changes: 1 addition & 1 deletion memory-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hashbrown = { version = "0.12.0", default-features = false, features = [ "ahash"

[dev-dependencies]
keccak-hasher = { path = "../test-support/keccak-hasher" }
criterion = "0.3.3"
criterion = "0.4.0"

[features]
default = ["std"]
Expand Down
16 changes: 5 additions & 11 deletions memory-db/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#[macro_use]
extern crate criterion;
use criterion::{black_box, Criterion};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hash_db::{HashDB, Hasher, EMPTY_PREFIX};
use keccak_hasher::KeccakHasher;
use memory_db::{HashKey, MemoryDB};

criterion_group!(
benches,
instantiation,
Expand All @@ -25,14 +27,6 @@ criterion_group!(
);
criterion_main!(benches);

extern crate hash_db;
extern crate keccak_hasher;
extern crate memory_db;

use hash_db::{HashDB, Hasher, EMPTY_PREFIX};
use keccak_hasher::KeccakHasher;
use memory_db::{HashKey, MemoryDB};

fn instantiation(b: &mut Criterion) {
b.bench_function("instantiation", move |b| {
b.iter(|| {
Expand Down
3 changes: 1 addition & 2 deletions test-support/reference-trie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ edition = "2018"

[dependencies]
hash-db = { path = "../../hash-db" , version = "0.15.2"}
hash256-std-hasher = { path = "../../hash256-std-hasher", version = "0.15.2" }
keccak-hasher = { path = "../keccak-hasher", version = "0.15.3" }
trie-db = { path = "../../trie-db", default-features = false, version = "0.24.0" }
trie-root = { path = "../../trie-root", default-features = false, version = "0.17.0" }
Expand All @@ -18,7 +17,7 @@ hashbrown = { version = "0.12.0", default-features = false, features = ["ahash"]

[dev-dependencies]
trie-bench = { path = "../trie-bench" }
criterion = "0.3.3"
criterion = "0.4.0"

[[bench]]
name = "bench"
Expand Down
2 changes: 1 addition & 1 deletion test-support/trie-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ hash-db = { path = "../../hash-db" , version = "0.15.2"}
memory-db = { path = "../../memory-db", version = "0.31.0" }
trie-root = { path = "../../trie-root", version = "0.17.0" }
trie-db = { path = "../../trie-db", version = "0.24.0" }
criterion = "0.3.3"
criterion = "0.4.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ordian could you release a new version of trie-bench after merging this PR ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koushiro just did publish it, thanks for the PR.

parity-scale-codec = "3.0.0"
1 change: 0 additions & 1 deletion trie-db/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ cargo-fuzz = true
hash-db = { path = "../../hash-db", version = "0.15.2" }
memory-db = { path = "../../memory-db", version = "0.29.0" }
reference-trie = { path = "../../test-support/reference-trie", version = "0.26.0" }
keccak-hasher = { path = "../../test-support/keccak-hasher", version = "0.15.2" }

[dependencies.trie-db]
path = ".."
Expand Down
7 changes: 2 additions & 5 deletions trie-db/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ harness = false
[dependencies]
trie-db = { path = "..", version = "0.24.0"}
hash-db = { path = "../../hash-db", version = "0.15.2"}
rustc-hex = { version = "2.1.0" }
memory-db = { path = "../../memory-db", version = "0.31.0" }
rand = { version = "0.8", default-features = false, features = ["small_rng"] }
trie-root = { path = "../../trie-root", version = "0.17.0"}
trie-standardmap = { path = "../../test-support/trie-standardmap", version = "0.15.2" }
keccak-hasher = { path = "../../test-support/keccak-hasher", version = "0.15.2" }
reference-trie = { path = "../../test-support/reference-trie", version = "0.26.0" }
hex-literal = "0.3"
criterion = "0.3"
env_logger = "0.9"
criterion = "0.4.0"
env_logger = { version = "0.10", default-features = false }
log = "0.4"
Loading