Francesco Romani has posted comments on this change.

Change subject: vmstats: fix bulk stats misinterpretation (net)
......................................................................


Patch Set 4: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/43679/4/vdsm/virt/vmstats.py
File vdsm/virt/vmstats.py:

Line 137:         else:
Line 138:             logging.error('Failed to get VM cpu count')
Line 139: 
Line 140: 
Line 141: def nic(name, model, mac,
let's add one unit test for this, to make sure this will not happen again
Line 142:         start_sample, start_index,
Line 143:         end_sample, end_index, interval):
Line 144:     ifSpeed = [100, 1000][model in ('e1000', 'virtio')]
Line 145: 


Line 282: def _usage_percentage(val, interval):
Line 283:     return 100 * val / interval / 1000 ** 3
Line 284: 
Line 285: 
Line 286: def _find_bulk_stat_index(stats, group, value, attr='name'):
this deserves a test as well
Line 287:     if stats:
Line 288:         for idx in six.moves.xrange(stats['%s.count' % group]):
Line 289:             if stats['%s.%d.%s' % (group, idx, attr)] == value:
Line 290:                 return idx


-- 
To view, visit https://gerrit.ovirt.org/43679
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I57faae821394576aabc06dfaca2e1b4828a1339b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmire...@redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to