Made the CI also check the benchmarks, fixed compile issue in benchmarks (#449)
This commit is contained in:
parent
0ee07c3212
commit
a5255465bd
|
|
@ -4,7 +4,8 @@
|
||||||
"push": {
|
"push": {
|
||||||
"branches": [
|
"branches": [
|
||||||
"trunk",
|
"trunk",
|
||||||
"v*.x"
|
"v*.x",
|
||||||
|
"ci/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pull_request": {
|
"pull_request": {
|
||||||
|
|
@ -51,6 +52,14 @@
|
||||||
},
|
},
|
||||||
"name": "Run `cargo check`"
|
"name": "Run `cargo check`"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"uses": "actions-rs/cargo@v1",
|
||||||
|
"with": {
|
||||||
|
"command": "check",
|
||||||
|
"args": "--bench *"
|
||||||
|
},
|
||||||
|
"name": "Run `cargo check` on benches"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"uses": "actions-rs/cargo@v1",
|
"uses": "actions-rs/cargo@v1",
|
||||||
"with": {
|
"with": {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ fn inline_decoder_claim_bytes_read(c: &mut Criterion) {
|
||||||
|
|
||||||
c.bench_function("inline_decoder_claim_bytes_read", |b| {
|
c.bench_function("inline_decoder_claim_bytes_read", |b| {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let _: Vec<String> =
|
let _: (Vec<String>, usize) =
|
||||||
black_box(bincode::decode_from_slice(black_box(&slice), config).unwrap());
|
black_box(bincode::decode_from_slice(black_box(&slice), config).unwrap());
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue