Skip to content

Commit d1497bc

Browse files
committed
Use criterion for benchmarks.
Not only is it a better benchmark tool, it also avoids depending on nightly rustc.
1 parent 4f2364a commit d1497bc

File tree

10 files changed

+805
-626
lines changed

10 files changed

+805
-626
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ matrix:
66
- rust: stable
77
- rust: beta
88
- rust: nightly
9-
env:
10-
- BENCH=1
119
branches:
1210
only:
1311
- master
@@ -19,4 +17,4 @@ script:
1917
cargo build --verbose --no-default-features &&
2018
cargo build --verbose --features "$FEATURES" &&
2119
cargo test --verbose --features "$FEATURES" &&
22-
([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")
20+
cargo bench --verbose --features "$FEATURES"

Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ either = { version = "1.0", default-features = false }
2525

2626
[dev-dependencies]
2727
rand = "0.7"
28+
criterion = "0.3"
2829

2930
[dev-dependencies.quickcheck]
3031
version = "0.9"
@@ -39,3 +40,27 @@ use_std = []
3940

4041
[profile]
4142
bench = { debug = true }
43+
44+
[[bench]]
45+
name = "tuple_combinations"
46+
harness = false
47+
48+
[[bench]]
49+
name = "tuples"
50+
harness = false
51+
52+
[[bench]]
53+
name = "fold_specialization"
54+
harness = false
55+
56+
[[bench]]
57+
name = "combinations_with_replacement"
58+
harness = false
59+
60+
[[bench]]
61+
name = "tree_fold1"
62+
harness = false
63+
64+
[[bench]]
65+
name = "bench1"
66+
harness = false

0 commit comments

Comments
 (0)