From 17e815ee16d3885772a6ed1e773542cde7e74577 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Tue, 10 Dec 2024 13:45:57 +0000 Subject: [PATCH] Profiler: Revert the removal of the CPU consumption column from output --- src/lib_base/unix/simple_profiler.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib_base/unix/simple_profiler.ml b/src/lib_base/unix/simple_profiler.ml index ee89021b5a37..746fcde8da83 100644 --- a/src/lib_base/unix/simple_profiler.ml +++ b/src/lib_base/unix/simple_profiler.ml @@ -256,7 +256,12 @@ let pp_line ?toplevel_timestamp nindent ppf (id, metadata) n t = in Format.fprintf ppf "%s %-7i " (String.sub indentsym 0 80) n ; if t.wall = 0. then Format.fprintf ppf " " - else Format.fprintf ppf "% 10.3fms" (t.wall *. 1000.) ; + else + Format.fprintf + ppf + "% 10.3fms %3d%%" + (t.wall *. 1000.) + (int_of_float (ceil (100. *. (t.cpu /. t.wall)))) ; Format.fprintf ppf "@," let rec pp_report ?(toplevel_call = true) t0 nident ppf {aggregated; recorded} = -- GitLab