File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ serde_json = "1.0"
25
25
json = []
26
26
enable-arbitrary = [" arbitrary" ]
27
27
28
+ [lib ]
29
+ bench = false
30
+
28
31
[[bench ]]
29
32
name = " benchmarks"
30
33
harness = false
Original file line number Diff line number Diff line change @@ -24,9 +24,13 @@ fn new(c: &mut Criterion) {
24
24
}
25
25
26
26
fn decode_encode ( c : & mut Criterion ) {
27
- let bf = example1 ( ) ;
28
27
c. bench_function ( "decode_encode" , |b| {
29
- b. iter ( || BitField :: from_ranges ( bf. ranges ( ) ) )
28
+ b. iter ( || BitField :: from_ranges ( example1 ( ) . ranges ( ) ) )
29
+ } ) ;
30
+ }
31
+ fn decode ( c : & mut Criterion ) {
32
+ c. bench_function ( "decode" , |b| {
33
+ b. iter ( || example1 ( ) )
30
34
} ) ;
31
35
}
32
36
@@ -99,6 +103,7 @@ criterion_group!(
99
103
len,
100
104
bits,
101
105
new,
106
+ decode,
102
107
decode_encode,
103
108
from_ranges,
104
109
is_empty,
You can’t perform that action at this time.
0 commit comments