Skip to content

Commit 9f07b63

Browse files
committed
cargo fmt
1 parent c289711 commit 9f07b63

2 files changed

Lines changed: 9 additions & 20 deletions

File tree

benches/crossbeam.rs

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
1+
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
22

33
#[allow(dead_code)]
44
fn test_add(x: usize) -> usize {
@@ -18,12 +18,7 @@ struct BigData {
1818

1919
#[allow(dead_code, unused_variables)]
2020
#[allow(dead_code)]
21-
async fn crossbeam(
22-
msg_vecs: Vec<Vec<BigData>>,
23-
c: usize,
24-
task_count: usize,
25-
msg_count: usize,
26-
) {
21+
async fn crossbeam(msg_vecs: Vec<Vec<BigData>>, c: usize, task_count: usize, msg_count: usize) {
2722
// let (s, r) = bounded_async(c);
2823
// let queue = crossbeam::queue::ArrayQueue::new(c);
2924
// let mut handles = Vec::new();
@@ -109,16 +104,12 @@ fn benchmark_crossbeam(c: &mut Criterion) {
109104

110105
// todo!();
111106
// }
112-
c.bench_with_input(
113-
BenchmarkId::new("Crossbeam", 0),
114-
&(0),
115-
|b, &cap| {
116-
// Insert a call to `to_async` to convert the bencher to async mode.
117-
// The timing loops are the same as with the normal bencher.
118-
// let msg_vec_clone = msg_vecs.clone();
119-
b.iter(|| sync_crossbeam())
120-
},
121-
);
107+
c.bench_with_input(BenchmarkId::new("Crossbeam", 0), &(0), |b, &cap| {
108+
// Insert a call to `to_async` to convert the bencher to async mode.
109+
// The timing loops are the same as with the normal bencher.
110+
// let msg_vec_clone = msg_vecs.clone();
111+
b.iter(|| sync_crossbeam())
112+
});
122113
}
123114

124115
criterion_group!(benches, benchmark_crossbeam);

benches/srb.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,7 @@ fn benchmark_srb(c: &mut Criterion) {
268268

269269
for shard_num in SHARDS {
270270
for task_count in TASKS {
271-
let func_name = format!(
272-
"ShardedRingBuf"
273-
);
271+
let func_name = format!("ShardedRingBuf");
274272

275273
group.bench_with_input(
276274
BenchmarkId::new(func_name, CAPACITY),

0 commit comments

Comments
 (0)