mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Fix formatting of debug timing markers
This commit is contained in:
parent
88f5e932c8
commit
561788cbaf
@ -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 "@{<bold;black>[TIME] %.0fms@}@\n" delta
|
||||
if delta > 50. then Format.fprintf ppf " @{<bold;black>%.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}*)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user