From 08a4ed892dbe8c23950c1bbd5a580239739f9968 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sun, 14 Aug 2022 23:21:22 -0400 Subject: [PATCH] feat(stat): improve printing --- src/util/Stat.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/Stat.ml b/src/util/Stat.ml index f024a9f0..e24db9b2 100644 --- a/src/util/Stat.ml +++ b/src/util/Stat.ml @@ -39,10 +39,10 @@ let[@inline] set c x : unit = c.count <- x let pp_counters out l = let pp_w out = function - | C_int { name; count } -> Fmt.fprintf out "@[:%s %d@]" name count - | C_float { name; count } -> Fmt.fprintf out "@[:%s %.4f@]" name count + | C_int { name; count } -> Fmt.fprintf out "(@[%s %d@])" name count + | C_float { name; count } -> Fmt.fprintf out "(@[%s %.4f@])" name count in - Fmt.fprintf out "(@[stats@ %a@])" Fmt.(iter ~sep:(return "@ ") pp_w) l + Fmt.fprintf out "(@[<1>stats@ %a@])" Fmt.(iter ~sep:(return "@ ") pp_w) l let pp out (self : t) = pp_counters out @@ all self let global = create ()