Typed runtime_events probes for OCaml
0

Configure Feed

Select the types of activity you want to include in your feed.

probe, pid1: prefer Fmt over Printf in bench/test

Printf.printf/sprintf in the probe alloc bench and the pid1 obs test
tripped merlint E205 once their .cmt artifacts were built; switch to
Fmt.pr/Fmt.str (adding fmt to the bench dune).

+4 -4
+3 -3
bench/alloc.ml
··· 17 17 in 18 18 let sp = Probe.span "bench.span" Probe.Fields.unit in 19 19 (* top-level: no parent span, current is the sentinel *) 20 - Printf.printf "emit top-level = %.3f words/op\n" 20 + Fmt.pr "emit top-level = %.3f words/op@." 21 21 (words_per_op ~warmup:2000 1_000_000 (fun () -> Probe.emit ev 1)); 22 22 let handle = Probe.enter sp () in 23 - Printf.printf "emit nested = %.3f words/op\n" 23 + Fmt.pr "emit nested = %.3f words/op@." 24 24 (words_per_op ~warmup:2000 1_000_000 (fun () -> Probe.emit ev 1)); 25 - Printf.printf "with_span = %.3f words/op\n" 25 + Fmt.pr "with_span = %.3f words/op@." 26 26 (words_per_op ~warmup:2000 1_000_000 (fun () -> 27 27 Probe.with_span sp () (fun () -> ()))); 28 28 Probe.exit handle
+1 -1
bench/dune
··· 1 1 (executable 2 2 (name alloc) 3 - (libraries probe runtime_events)) 3 + (libraries probe runtime_events fmt))