mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -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 () =
|
||||
Printf.printf "collector is on %S\n%!" (Opentelemetry_client_ocurl.get_url());
|
||||
|
||||
(* 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
|
||||
T.GC_metrics.basic_setup();
|
||||
|
||||
let i = ref 0 in
|
||||
while true do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue