diff --git a/battlesnake/benches/simulation.rs b/battlesnake/benches/simulation.rs index e2ff45d..5316314 100644 --- a/battlesnake/benches/simulation.rs +++ b/battlesnake/benches/simulation.rs @@ -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);