(
group: &mut BenchmarkGroup<'_, WallTime>,
backend: &str,
workload: &str,
mut memory: M,
offset: usize,
len: usize,
)
| 34 | } |
| 35 | |
| 36 | fn bench_write_all<M: LinearMemory>( |
| 37 | group: &mut BenchmarkGroup<'_, WallTime>, |
| 38 | backend: &str, |
| 39 | workload: &str, |
| 40 | mut memory: M, |
| 41 | offset: usize, |
| 42 | len: usize, |
| 43 | ) { |
| 44 | let src = vec![0xA5; len]; |
| 45 | group.bench_function(BenchmarkId::new(format!("write_all/{workload}"), backend), |b| { |
| 46 | b.iter(|| { |
| 47 | memory.write_all(offset, black_box(&src)).unwrap(); |
| 48 | black_box(memory.len()) |
| 49 | }) |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | fn bench_read_exact<M: LinearMemory>( |
| 54 | group: &mut BenchmarkGroup<'_, WallTime>, |
no test coverage detected