qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/3] qmp: Support for querying stats


From: Mark Kanda
Subject: Re: [PATCH v2 1/3] qmp: Support for querying stats
Date: Tue, 18 Jan 2022 07:59:10 -0600
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 1/18/2022 6:52 AM, Daniel P. Berrangé wrote:
On Tue, Jan 18, 2022 at 01:26:32PM +0100, Paolo Bonzini wrote:
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).
An explicit ID isn't strictly required, since the caller can assume
the results are ordered on CPU ID, so even if they gave a request
for a sparse subset of CPUs, the results can be interpreted.  None
the less having a vCPU id included is more friendly, so worth
having.


Regards,
Daniel
OK. Thank you Daniel and Paolo. I'll implement these changes for v3.

Best regards,
-Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]