[PATCH 0/3] qemu: add an API for "query-stats" QMP command

Amneesh Singh posted 3 patches 1 year, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220624081449.70085-1-natto@weirdnatto.in
There is a newer version of this series
src/qemu/qemu_capabilities.c |   2 +
src/qemu/qemu_capabilities.h |   1 +
src/qemu/qemu_driver.c       |  48 +++++++++++--
src/qemu/qemu_monitor.c      |  46 +++++++++++++
src/qemu/qemu_monitor.h      |  36 ++++++++++
src/qemu/qemu_monitor_json.c | 128 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_monitor_json.h |   6 ++
7 files changed, 263 insertions(+), 4 deletions(-)
[PATCH 0/3] qemu: add an API for "query-stats" QMP command
Posted by Amneesh Singh 1 year, 10 months ago
QEMU is gaining introspectable statistics which can be queried via the
"query-stats" QMP command. This patchset aims to add an API for the
same.

The returned JSON for "query-stats" is an array of objects containing
their own respective array of statistics.

Patch 1 adds the API which returns the deserialized JSON in the form of
a GPtrArray of GHashTables.

Patch 2 adds the "query-stats" to QEMU capabilities.

Patch 3 uses the API to query the halt poll success time and the halt
poll failure time.

Relevant QEMU patches can be found here:
https://lore.kernel.org/all/20220523150509.349412-1-pbonzini@redhat.com/

This patchset is part of the 2022 GSOC contributor project. All reviews
and comments are appreciated :).

Amneesh Singh (3):
  qemu_monitor: add qemuMonitorQueryStats
  qemu_capabilities: add "query-stats" QMP command to the QEMU
    capabilities
  qemu_driver: use qemuMonitorQueryStats to extract halt poll time

 src/qemu/qemu_capabilities.c |   2 +
 src/qemu/qemu_capabilities.h |   1 +
 src/qemu/qemu_driver.c       |  48 +++++++++++--
 src/qemu/qemu_monitor.c      |  46 +++++++++++++
 src/qemu/qemu_monitor.h      |  36 ++++++++++
 src/qemu/qemu_monitor_json.c | 128 +++++++++++++++++++++++++++++++++++
 src/qemu/qemu_monitor_json.h |   6 ++
 7 files changed, 263 insertions(+), 4 deletions(-)

-- 
2.36.1