Change in vdsm[master]: report cpuUser and cpuSys separately

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Thu Sep 6 08:53:56 UTC 2012


Mark Wu has posted comments on this change.

Change subject: report cpuUser and cpuSys separately
......................................................................


Patch Set 1: (1 inline comment)

What's the benefit of this patch?  To tell the cputime spent by qemu and guest OS?  Do users care about it?

....................................................
File vdsm/libvirtvm.py
Line 173: 
Line 174:         try:
Line 175:             stats['cpuUser'] = 100 * (eInfo['user_time'] - sInfo['user_time']) / sampleInterval / nanos
Line 176:             stats['cpuSys'] = 100 * (eInfo['system_time'] - sInfo['system_time']) / sampleInterval / nanos
Line 177:             cpuTime = 100 * (eInfo['cpu_time'] - sInfo['cpu_time']) / sampleInterval / (nanos * ticks)
Why remove "100 *", I think 100 times should be right.  
According to line 183,   it needs to be scaled into (0, 100)
Line 178:         except (TypeError, ZeroDivisionError) as e:
Line 179:             self._log.debug("CPU stats not available: %s", e)
Line 180:             stats['cpuUser'] = 0.0
Line 181:             stats['cpuSys'] = 0.0


--
To view, visit http://gerrit.ovirt.org/7718
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I663ad25ff3ff5ce426b5159b6c9a65b7f5167605
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list