mte/unikernel/duniverse/fmt/test/styled_perf_bug.ml

12 lines
287 B
OCaml
Raw Normal View History

2025-11-11 02:07:51 +01:00
let n = 10000
let () =
while true do
let t0 = Unix.gettimeofday () in
for _i = 1 to n do
ignore @@ Fmt.str "Hello %a" Fmt.string "world"
done;
let t1 = Unix.gettimeofday () in
Printf.printf "Formatted %.0f messages/second\n%!" (float n /. (t1 -. t0))
done