avoid deprecation warning when calling OS.MM.malloc_metrics

This commit is contained in:
Hannes Mehnert 2022-01-27 13:33:26 +01:00
parent 5ab788b95d
commit 5ed8d422d2

View file

@ -91,7 +91,7 @@ module Make (T : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct
Metrics.set_reporter reporter;
Metrics.enable_all ();
Metrics_lwt.init_periodic (fun () -> T.sleep_ns (Duration.of_sec interval));
Metrics_lwt.periodically (OS.MM.malloc_metrics ~tags:Metrics.Tags.[]);
Metrics_lwt.periodically (OS.MM.malloc_metrics ~tags:Metrics.Tags.[])[@warning "-3"];
Metrics_lwt.periodically (memory_metrics ~tags:Metrics.Tags.[]);
let host = match hostname with None -> [] | Some host -> [vmname host] in
Lwt.async (timer_loop get_cache host interval stack (dst, port))