-
- Downloads
qemu_monitor: add qemuMonitorQueryStats
Related: #276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based on the target, which can either be vCPU or VM, and the providers. The API deserializes the query result into an array of GHashMaps, which can later be used to extract all the query statistics. GHashMaps are used to avoid traversing the entire array to find the statistics you are looking for. This would be a singleton array if the target is a VM since the returned JSON is also a singleton array in that case. Signed-off-by:Amneesh Singh <natto@weirdnatto.in> Reviewed-by:
Martin Kletzander <mkletzan@redhat.com>
Showing
- src/qemu/qemu_monitor.c 120 additions, 0 deletionssrc/qemu/qemu_monitor.c
- src/qemu/qemu_monitor.h 48 additions, 0 deletionssrc/qemu/qemu_monitor.h
- src/qemu/qemu_monitor_json.c 91 additions, 0 deletionssrc/qemu/qemu_monitor_json.c
- src/qemu/qemu_monitor_json.h 6 additions, 0 deletionssrc/qemu/qemu_monitor_json.h
Loading
Please register or sign in to comment