minor: re-format the `buffer.rs`

pull/259/head
Daniel Abramov 3 years ago
parent cd79500d25
commit 47f669dacb
  1. 10
      benches/buffer.rs

@ -1,5 +1,5 @@
use std::io::{Cursor, Read};
use std::io::Result as IoResult;
use std::io::{Cursor, Read};
use bytes::Buf;
use criterion::*;
@ -114,8 +114,12 @@ fn benchmark(c: &mut Criterion) {
let mut group = c.benchmark_group("buffers");
group.throughput(Throughput::Bytes(STREAM_SIZE as u64));
group.bench_function("InputBuffer", |b| b.iter(|| input_buffer(black_box(stream.clone()))));
group.bench_function("ReadBuffer (stack)", |b| b.iter(|| stack_read_buffer(black_box(stream.clone()))));
group.bench_function("ReadBuffer (heap)", |b| b.iter(|| heap_read_buffer(black_box(stream.clone()))));
group.bench_function("ReadBuffer (stack)", |b| {
b.iter(|| stack_read_buffer(black_box(stream.clone())))
});
group.bench_function("ReadBuffer (heap)", |b| {
b.iter(|| heap_read_buffer(black_box(stream.clone())))
});
group.finish();
}

Loading…
Cancel
Save