ocaml-trace/test/t1.ml
2023-06-08 22:31:51 -04:00

12 lines
398 B
OCaml

let run () =
for _i = 1 to 50 do
Trace.with_ ~__FUNCTION__ ~__FILE__ ~__LINE__ "outer.loop" @@ fun _sp ->
for _j = 2 to 5 do
Trace.with_ ~__FILE__ ~__LINE__ "inner.loop" @@ fun _sp ->
Trace.messagef ~__FILE__ ~__LINE__ (fun k -> k "hello %d %d" _i _j)
done
done
let () =
Trace_tef.Internal_.use_mock_mtime_ ();
Trace_tef.with_setup ~out:`Stdout @@ fun () -> run ()