Fix up benchmark harness and test data

This commit is contained in:
Tony Garnock-Jones 2022-07-12 16:57:12 +02:00
parent 9d7525bcec
commit c834f4b04a
2 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,7 @@ pub fn large_testdata_decoder_with_ann(c: &mut Criterion) {
b.iter(|| {
let mut src = BytesBinarySource::new(&bs[..]);
let mut r = src.packed();
r.open_sequence().unwrap();
while let Some(_) = r.next_iovalue(true).unwrap() {}
})
});
@ -104,6 +105,7 @@ pub fn large_testdata_decoder_without_ann(c: &mut Criterion) {
b.iter(|| {
let mut src = BytesBinarySource::new(&bs[..]);
let mut r = src.packed();
r.open_sequence().unwrap();
while let Some(_) = r.next_iovalue(false).unwrap() {}
})
});
@ -115,6 +117,7 @@ pub fn large_testdata_encoder(c: &mut Criterion) {
let mut vs = vec![];
let mut src = IOBinarySource::new(&mut fh);
let mut r = src.packed();
r.open_sequence().unwrap();
while let Some(v) = r.next_iovalue(true).unwrap() {
vs.push(v);
}