[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/3] qmp: Support for querying stats
|
From: |
Paolo Bonzini |
|
Subject: |
Re: [PATCH v2 1/3] qmp: Support for querying stats |
|
Date: |
Tue, 18 Jan 2022 13:26:32 +0100 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 1/17/22 16:17, Mark Kanda wrote:
I agree except that I think this and StatsResults should be unions,
even if it means running multiple query-stats commands.
IIUC, making StatsResults a union implies the filter is a required
argument (currently it is optional - omitting it dumps all VM and VCPU
stats). Just to confirm - we want the filter to be required?
Yeah, I think at least the "kind" (vcpu, vm, perhaps in the future block
or net) should be mandatory. If the caller doesn't know of a "kind",
chances are it won't be able to understand what object the stats refer
to, for example the vcpu "id" here:
{ 'union': 'StatsResults',
'base': { 'target': 'StatsTarget', stats: ['StatsResultsEntry'] },
'discriminator': 'target',
'data': { 'vcpu': ['id': 'int'] }
}
(which is another different between Daniel's proposal and mine; his just
placed all vcpus into an array with no explicit id, if I understand
correctly).
Paolo