cleanup test + ensure chain validity
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
|
||||
use std::time::Duration;
|
||||
|
||||
// use crate::future_move::FutureMove;
|
||||
use othello::{board::Board, future_moves::FutureMoves, piece::Piece};
|
||||
use std::time::Duration;
|
||||
|
||||
fn extend_layers_test(depth: usize, expire: usize) {
|
||||
let mut fut = FutureMoves::new(Piece::Black, depth, expire);
|
||||
@@ -15,10 +13,10 @@ fn criterion_benchmark(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group(format!("extend_layers (expire {})", EXPIRE));
|
||||
group.measurement_time(Duration::from_secs(10));
|
||||
|
||||
for (depth, expire) in (2..6).zip([EXPIRE].iter().cycle()) {
|
||||
for (depth, expire) in (2..6).zip([EXPIRE].into_iter().cycle()) {
|
||||
group.throughput(Throughput::Elements(depth as u64));
|
||||
group.bench_with_input(BenchmarkId::from_parameter(depth), &depth, |b, depth| {
|
||||
b.iter(|| extend_layers_test(*depth, *expire));
|
||||
b.iter(|| extend_layers_test(*depth, expire));
|
||||
});
|
||||
}
|
||||
group.finish();
|
||||
|
||||
Reference in New Issue
Block a user