From b4bb0492ff4403b38b1257453a512b2cb0953d46 Mon Sep 17 00:00:00 2001 From: Morten Lohne Date: Mon, 29 Jul 2024 23:27:58 +0200 Subject: [PATCH] Print memory usage at the end of a benchmark --- src/bin/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index d147975..14fadae 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -954,11 +954,12 @@ fn bench_position(position: Position, 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) ); }