Skip to content

Commit

Permalink
compat trace 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 30, 2024
1 parent 6d4412a commit dcbc007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/trace/tracy_client_trace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ module C () : Trace.Collector.S = struct
in
Tracy_client.add_text sp msg

let enter_span ?__FUNCTION__ ~__FILE__ ~__LINE__ ~data name : Trace.span =
let enter_span ~__FUNCTION__ ~__FILE__ ~__LINE__ ~data name : Trace.span =
let sp = Tracy_client.enter ?__FUNCTION__ ~__FILE__ ~__LINE__ name in
if data <> [] then List.iter (process_data sp) data;
Int64.of_int sp

let exit_span (sp : Trace.span) : unit = Tracy_client.exit (Int64.to_int sp)

let with_span ~__FUNCTION__ ~__FILE__ ~__LINE__ ~data name f =
let sp = enter_span ?__FUNCTION__ ~__FILE__ ~__LINE__ ~data name in
let sp = enter_span ~__FUNCTION__ ~__FILE__ ~__LINE__ ~data name in
let finally () = exit_span sp in
Fun.protect ~finally (fun () -> f sp)

Expand Down

0 comments on commit dcbc007

Please sign in to comment.