bheisler / criterion.rs

Statistics-driven benchmarking library for Rust
Apache License 2.0
4.52k stars 301 forks source link

book: fix an example of throughput measurements #773

Closed loloicci closed 2 months ago

loloicci commented 5 months ago

This PR fixes a mistake in an example of throughput measurements in the book.

In an example code of throughput measurements,

  1. elems is used before it is defined. This seems to be a mistake for elements.
  2. the arguments of the third parameter bench_with_input is elem, b. It seems to be a mistake for b, elem