package tracy-client
Client bindings to the Tracy profiler (v0.9.1)
Install
Dune Dependency
Authors
Maintainers
Sources
tracy-client-0.1.tbz
sha256=287fa7ad450f43951925ac119ad6b3b1e485a3942652e5bf9b483e49800ae772
sha512=72152274402cd2d2ad0c7e3ba0b3896c0bc1ab92d021460da94a2f9fe634759b2021d70d8175b3269aa6197b7917449007e96b53a8ccd8d534b50debd1b5162b
doc/src/tracy-client.trace/tracy_client_trace.ml.html
Source file tracy_client_trace.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
type span = Trace.span let spf = Printf.sprintf module C () : Trace.Collector.S = struct let name_thread = Tracy_client.name_thread let name_process _ = () let process_data sp (d : string * Trace.user_data) = let k, v = d in let msg = match v with | `String s -> spf "%s: %s\n" k s | `Int i -> spf "%s: %d\n" k i | `Bool b -> spf "%s: %b\n" k b | `None -> spf "%s\n" k in Tracy_client.add_text sp msg let enter_span ?__FUNCTION__ ~__FILE__ ~__LINE__ ~data name : 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 : span) : unit = Tracy_client.exit (Int64.to_int sp) let message ?span:_ ~data:_ msg : unit = Tracy_client.message msg let counter_float name n : unit = Tracy_client.plot name n let counter_int name n : unit = counter_float name (float_of_int n) let shutdown () = () end let collector () : Trace.collector = let module C = C () in (module C) let setup () = Trace.setup_collector @@ collector ()
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>