From bb2c17e67604d881b2a5b2cc48c30a6d100173bc Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 30 Oct 2025 15:08:40 +0100 Subject: [PATCH] Minor_allocated: Use Gc.minor_words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Minor_allocated was showing a result of 0.0000 mnw/run, possibly because my benchmarks weren't triggering minor collections. With this change, the results seems more accurate but the R² is low (printed on a red background in the notty output). The R² seems unchanged for tests that trigger minor collections. --- lib/toolkit.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/toolkit.ml b/lib/toolkit.ml index b17a2a1..a516d2b 100644 --- a/lib/toolkit.ml +++ b/lib/toolkit.ml @@ -15,7 +15,7 @@ module Minor_allocated = struct let load () = () let unload () = () let make () = () - let get () = (Gc.quick_stat ()).minor_words + let get () = Gc.minor_words () let label () = "minor-allocated" let unit () = "mnw" end