Vinzenz Feenstra has posted comments on this change. Change subject: hooks: Add hook for fake VM stats ......................................................................
Patch Set 10: (3 comments) http://gerrit.ovirt.org/#/c/25927/10/vdsm_hooks/fakevmstats/after_get_all_vm_stats.py File vdsm_hooks/fakevmstats/after_get_all_vm_stats.py: Line 80: stats['cpuSys'] = '%.2f' % (cpuTotal - cpuUser) Line 81: stats['memUsage'] = str(random.randint(0, 100)) Line 82: Line 83: # Disks Line 84: for disk in stats['disks'].iterkeys(): for disk in stats['disks'].itervalues(): disk['readRate'] = ... Line 85: # Simulate some supersonic disks: Line 86: stats['disks'][disk]['readRate'] = str(random.randint(0, 2**32)) Line 87: stats['disks'][disk]['writeRate'] = str(random.randint(0, 2**32)) Line 88: stats['disks'][disk]['readLatency'] = str(random.randint(0, 10**9)) Line 93: for net in stats['network'].iterkeys(): for net in stats['network'].itervalues(): net['rxRate'] = ... Line 99: stats['network'][net]['txErrors'] = str(random.randint(0, 2*32)) Line 100: Line 101: # Fake guest-agent reports: Line 102: stats['session'] = 'Unknown' Line 103: if not 'memoryStats' in stats.keys(): if 'memoryStats' not in stats: Line 104: stats['memoryStats'] = {} Line 105: stats['memoryStats']['mem_total'] = str((2**random.randint(0, 5)) * GB) Line 106: memUsed = int(random.random() * int(stats['memoryStats']['mem_total'])) Line 107: memUnused = int(random.random() * memUsed) -- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <dkuzn...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: mooli tayer <mta...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches