async_mpsc.rs 506 B

123456789101112131415
  1. mod async_mpsc_utils;
  2. use criterion::{criterion_group, criterion_main, Criterion};
  3. fn bench_mpsc_reusable(c: &mut Criterion) {
  4. let group = c.benchmark_group("async/mpsc_reusable");
  5. async_mpsc_utils::bench_mpsc_reusable(group, 200, 50);
  6. }
  7. fn bench_mpsc_integer(c: &mut Criterion) {
  8. let group = c.benchmark_group("async/mpsc_integer");
  9. async_mpsc_utils::bench_mpsc_integer(group, 1000, 100);
  10. }
  11. criterion_group!(benches, bench_mpsc_reusable, bench_mpsc_integer,);
  12. criterion_main!(benches);