vmm: log metrics when the microVM starts
This allows interested parties to get the process startup time ASAP (in
case the microvM will live for less than 60s).
@@ -966,6 +966,11 @@ impl Vmm {
.fd
.set_state(timer_state, SetTimeFlags::Default);
+ // Log the metrics straight away to check the process startup time.
+ if let Err(_) = LOGGER.log_metrics() {
+ METRICS.logger.missed_metrics_count.inc();
+ }
+
Ok(())
}
