mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 04:17:56 -04:00
test
This commit is contained in:
parent
f7499be0dd
commit
5792c875e8
1 changed files with 11 additions and 3 deletions
|
|
@ -1,10 +1,13 @@
|
||||||
|
|
||||||
module T = Opentelemetry
|
module T = Opentelemetry
|
||||||
|
|
||||||
|
let (let@) f x = f x
|
||||||
|
|
||||||
let run () =
|
let run () =
|
||||||
Printf.printf "collector is on %S\n%!" (Opentelemetry_client_ocurl.get_url());
|
Printf.printf "collector is on %S\n%!" (Opentelemetry_client_ocurl.get_url());
|
||||||
let i = ref 0 in
|
let i = ref 0 in
|
||||||
while true do
|
while true do
|
||||||
|
let@ (tr,sp) = T.Trace.with_ "loop" in
|
||||||
Unix.sleepf 2.;
|
Unix.sleepf 2.;
|
||||||
|
|
||||||
let gc = Gc.stat() in
|
let gc = Gc.stat() in
|
||||||
|
|
@ -17,9 +20,14 @@ let run () =
|
||||||
|
|
||||||
incr i;
|
incr i;
|
||||||
|
|
||||||
(* allocate some stuff *)
|
begin
|
||||||
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
let@ _ = T.Trace.with_ ~kind:T.Span.Span_kind_client
|
||||||
ignore _arr;
|
~trace_id:tr ~parent:sp "alloc" in
|
||||||
|
(* allocate some stuff *)
|
||||||
|
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
||||||
|
ignore _arr;
|
||||||
|
Unix.sleepf 0.1;
|
||||||
|
end;
|
||||||
done
|
done
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue