add clone benchmark
This commit is contained in:
parent
5bb7476af6
commit
47f75563ae
@ -216,5 +216,17 @@ fn constrictor(c: &mut Criterion) {
|
||||
}
|
||||
}
|
||||
|
||||
criterion_group!(benches, standard, constrictor);
|
||||
fn clone(c: &mut Criterion) {
|
||||
let request = create_standard_start_request([
|
||||
Coord { x: 1, y: 1 },
|
||||
Coord { x: 9, y: 1 },
|
||||
Coord { x: 1, y: 9 },
|
||||
Coord { x: 9, y: 9 },
|
||||
]);
|
||||
let board = Board::from(&request);
|
||||
|
||||
c.bench_function("clone", |b| b.iter(|| board.clone()));
|
||||
}
|
||||
|
||||
criterion_group!(benches, standard, constrictor, clone);
|
||||
criterion_main!(benches);
|
||||
|
Loading…
x
Reference in New Issue
Block a user