Skip to content

Commit

Permalink
Print memory usage at the end of a benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
MortenLohne committed Jul 29, 2024
1 parent fb9f563 commit b4bb049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,12 @@ fn bench_position<const S: usize>(position: Position<S>, nodes: u32) {
let knps = nodes as f32 / (start_time.elapsed().as_secs_f32() * 1000.0);

println!(
"{}: {:.2}%, {:.2}s, {:.1} knps",
"{}: {:.2}%, {:.2}s, {:.1} knps, {}MiB used",
mv,
score * 100.0,
start_time.elapsed().as_secs_f32(),
knps,
tree.mem_usage() / (1024 * 1024)
);
}

Expand Down

0 comments on commit b4bb049

Please sign in to comment.