Skip to content

Commit

Permalink
test(json): Cover unit error as well
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jun 30, 2023
1 parent e450f1e commit a153974
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/json/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ fn json_bench(c: &mut criterion::Criterion) {

b.iter(|| parser::json::<Error>(sample).unwrap());
});
group.bench_with_input(criterion::BenchmarkId::new("unit", name), &len, |b, _| {
type Error<'i> = ();

b.iter(|| parser::json::<Error>(sample).unwrap());
});
group.bench_with_input(
criterion::BenchmarkId::new("verbose", name),
&len,
Expand Down

0 comments on commit a153974

Please sign in to comment.