diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-26 11:49:33 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-14 16:50:30 +0200 |
commit | 068cc51d42f771d2a453d628c10e199e7d104edd (patch) | |
tree | e89f2af7614e6975703837af8c2f3bc7137ec80c /monitor/hmp-cmds.c | |
parent | 433815f5bdf71b5b2c47d9f1104816b95b551c49 (diff) |
qmp: add filtering of statistics by provider
Allow retrieving the statistics from a specific provider only.
This can be used in the future by HMP commands such as "info
sync-profile" or "info profile". The next patch also adds
filter-by-provider capabilities to the HMP equivalent of
query-stats, "info stats".
Example:
{ "execute": "query-stats",
"arguments": {
"target": "vm",
"providers": [
{ "provider": "kvm" } ] } }
The QAPI is a bit more verbose than just a list of StatsProvider,
so that it can be subsequently extended with filtering of statistics
by name.
If a provider is specified more than once in the filter, each request
will be included separately in the output.
Extracted from a patch by Mark Kanda.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'monitor/hmp-cmds.c')
-rw-r--r-- | monitor/hmp-cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 04d5ee8fb7..9180cf1841 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -2397,7 +2397,7 @@ void hmp_info_stats(Monitor *mon, const QDict *qdict) goto exit_no_print; } - schema = qmp_query_stats_schemas(&err); + schema = qmp_query_stats_schemas(false, STATS_PROVIDER__MAX, &err); if (err) { goto exit; } |