Ján Tomko wrote:
On 04/30/2014 02:57 PM, Daniel P. Berrange wrote:
> On Wed, Apr 30, 2014 at 02:51:18PM +0200, Ján Tomko wrote:
>>
>> The apps should check how many stat parameters are supported for a given pCPU
>> by calling virDomainGetCPUStats with nparams=0 and/or check the actual number
>> of stats returned.
>>
>> Could we return valid results for total CPU stats (start_cpu = -1) and just
>> not return any for all other start_cpu values?
>
> Wouldn't that just be duplicating what we already provide via the
> virDomainGetInfo cpuTime field ? If so it doesn't seem like we need
> to add this feature to virDomainGetCPUStats too ?
>
Right, it's possible but not really useful.
OK, I'll abandon this feature until I figure out how to gather this stat
for specific host-cpu.
Also, bhyve driver currently doesn't set cpuTime in virDomainGetInfo(),
so I'll reuse my current code for overall cpu stats to populate this
field.
Thanks,
Roman Bogorodskiy