Francesco Romani has posted comments on this change. Change subject: sampling: hoststats: switch to SampleWindow ......................................................................
Patch Set 8: (1 comment) https://gerrit.ovirt.org/#/c/40428/8/vdsm/virt/sampling.py File vdsm/virt/sampling.py: Line 681: Line 682: def _getInterfacesStats(self): Line 683: stats = {} Line 684: hs0, hs1, _ = self._samples.stats() Line 685: if hs0 is None: > Yes, this is wrong. I said it is wrong because I got a bit confused: code uses either last two samples or first and last samples, and it has unusual sample window = 5. Actually, this should not explode for two reasons: * _getInterfaceStats is called when hs0 is not none, so when we do have at least two samples. * if there are at least two samples, bot hs0 and hs1 are not None. This means that this check is redundant, but I would like to remove in a different patch. Line 686: return stats Line 687: interval = hs1.timestamp - hs0.timestamp Line 688: Line 689: rx = tx = rxDropped = txDropped = 0 -- To view, visit https://gerrit.ovirt.org/40428 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ec5712ee1fb69ed3d8dbc28ca4e6511998270c9 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Ido Barkan <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
