Skip to content

Commit

Permalink
update GC metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 19, 2024
1 parent d9e5d99 commit 273ccdd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/opentheory/tool/trustee_ot.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,19 @@ let main ~dir ~serve ~port () =
in

let th_serve =
if serve then
if serve then (
let _th_metrics =
Thread.create
(fun () ->
let gc = Tiny_httpd_prometheus.(GC_metrics.create global) in
while true do
Thread.delay 1.;
Tiny_httpd_prometheus.GC_metrics.update gc
done)
()
in
Some (Thread.create (fun () -> Serve.serve st ~port) ())
else
) else
None
in

Expand Down

0 comments on commit 273ccdd

Please sign in to comment.