Change in vdsm[master]: hooks: Add hook for fake VM stats
dkuznets at redhat.com
dkuznets at redhat.com
Thu Mar 20 10:09:16 UTC 2014
Dima Kuznetsov has posted comments on this change.
Change subject: hooks: Add hook for fake VM stats
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/25927/2/vdsm_hooks/fakevmstats/after_vm_stats.py
File vdsm_hooks/fakevmstats/after_vm_stats.py:
Line 7: cpuTotal = random.random() * 100.0
Line 8: cpuUser = random.random() * cpuTotal
Line 9: stats['cpuUser'] = '%.2f' % (cpuUser)
Line 10: stats['cpuSys'] = '%.2f' % (cpuTotal - cpuUser)
Line 11: stats['memUsage'] = str(random.randint(0, 100))
> this should be in MB, not in precent
# @memUsage: The percent of memory in use by the guest
from vdsmapi-schema.json, also checked in code, and tested the change, and it is indeed 0 to 100
Line 12:
Line 13: # Disks
Line 14: for disk in stats['disks'].iterkeys():
Line 15: # Simulate some supersonic disks:
--
To view, visit http://gerrit.ovirt.org/25927
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a6d13f43495170a5cb86ae0b0efc1ae85ef05ab
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list