Expand description
Defines the metrics system for memory devices.
§Metrics format
The metrics are flushed in JSON when requested by vmm::logger::metrics::METRICS.write().
§JSON example with metrics:
"memory_hotplug": {
"activate_fails": "SharedIncMetric",
"queue_event_fails": "SharedIncMetric",
"queue_event_count": "SharedIncMetric",
...
}
}Each memory field in the example above is a serializable VirtioMemDeviceMetrics structure
collecting metrics such as activate_fails, queue_event_fails etc. for the memoty hotplug
device.
Since Firecrakcer only supports one virtio-mem device, there is no per device metrics and
memory_hotplug represents the aggregate entropy metrics.
Functions§
- flush_
metrics - Called by METRICS.flush(), this function facilitates serialization of virtio-mem device metrics.