On 09/02/2014 06:31 AM, Francesco Romani wrote:
This patch implements the VIR_DOMAIN_STATS_CPU_TOTAL
group of statistics.
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
include/libvirt/libvirt.h.in | 1 +
src/libvirt.c | 8 +++++++
src/qemu/qemu_driver.c | 56 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
+++ b/src/libvirt.c
@@ -21546,6 +21546,14 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* "state.reason" - reason for entering given state, returned as int from
* virDomain*Reason enum corresponding to given state.
*
+ * VIR_DOMAIN_STATS_CPU_TOTAL: Return CPU statistics and usage informations.
+ * The typed parameter keys are in this format:
+ * "cpu.count" - number of physical cpu available to this domain.
s/cpu/cpus/
Missing what type to expect. Mention that this one is returned as an
int (unsigned int would actually be better, but that means using
AddUInt() down below).
+ * "cpu.time" - total cpu time spent for this domain
+ * "cpu.user" - user cpu time spent
+ * "cpu.system" - system cpu time spent
Mention that these three are typed as unsigned long long.
rest of the patch looks okay, modulo the typing of cpu.count.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org