Skip to content
Snippets Groups Projects
Commit 3b265520 authored by Amneesh's avatar Amneesh :hearts: Committed by Martin Kletzander
Browse files

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's avatarAmneesh Singh <natto@weirdnatto.in>
Reviewed-by: default avatarMartin Kletzander <mkletzan@redhat.com>
parent a13baaf4
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment