mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-11 04:58:39 -04:00
test: in emit1, use GC_metrics
This commit is contained in:
parent
3d0d031bcd
commit
1b1b980211
1 changed files with 1 additions and 11 deletions
|
|
@ -8,17 +8,7 @@ let sleep_outer = ref 2.0
|
||||||
|
|
||||||
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());
|
||||||
|
T.GC_metrics.basic_setup();
|
||||||
(* regularly emit some metrics *)
|
|
||||||
let emit_gc() =
|
|
||||||
let gc = Gc.stat() in
|
|
||||||
T.Metrics.(
|
|
||||||
emit [
|
|
||||||
gauge ~name:"ocaml_opentracing.test.major_heap_words" [int gc.Gc.heap_words];
|
|
||||||
sum ~name:"ocaml_opentracing.test.minor_allocated" [float gc.Gc.minor_words];
|
|
||||||
]);
|
|
||||||
in
|
|
||||||
let _al = Gc.create_alarm emit_gc in
|
|
||||||
|
|
||||||
let i = ref 0 in
|
let i = ref 0 in
|
||||||
while true do
|
while true do
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue