From 561788cbafd1afa75a6d1f8d37654d4a85830678 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Wed, 26 Jun 2024 10:41:59 +0200 Subject: [PATCH] Fix formatting of debug timing markers --- compiler/catala_utils/message.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index 19594a57..9b1a8656 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -111,8 +111,7 @@ let print_time_marker = let old_time = !time in time := new_time; let delta = (new_time -. old_time) *. 1000. in - if delta > 50. then - Format.fprintf ppf "@{[TIME] %.0fms@}@\n" delta + if delta > 50. then Format.fprintf ppf " @{%.0fms@}" delta let pp_marker ?extra_label target ppf = let open Ocolor_types in @@ -129,10 +128,10 @@ let pp_marker ?extra_label target ppf = | None -> str | Some lbl -> Printf.sprintf "%s %s" str lbl in - if target = Debug then print_time_marker ppf (); Format.pp_open_stag ppf (Ocolor_format.Ocolor_styles_tag tags); Format.pp_print_string ppf str; - Format.pp_close_stag ppf () + Format.pp_close_stag ppf (); + if target = Debug then print_time_marker ppf () (**{2 Printers}*)