Dan Kenigsberg has posted comments on this change. Change subject: virt: migration: add monitor thread control loop ......................................................................
Patch Set 17: Code-Review-1 (1 comment) http://gerrit.ovirt.org/#/c/25976/17/vdsm/virt/migration.py File vdsm/virt/migration.py: Line 426: return 100 Line 427: progress = 100 - 100 * remaining / total if total else 0 Line 428: return progress if (progress < 100) else 99 Line 429: Line 430: if step % self._MONITOR_INTERVAL == 0: 0 is still a documented value, but it is going to cause ZeroDivisionError if used here. Also, _MONITOR_INTERVAL is in seconds. step is in _MONITOR_TICK. I am not sure what you meant by dividing the two. Come to think of it: have you considered to use AdvancedStatsFunction? It allows one thread to sample different properties in different frequencies. Line 431: (jobType, timeElapsed, _, Line 432: dataTotal, dataProcessed, dataRemaining, Line 433: memTotal, memProcessed, memRemaining, Line 434: fileTotal, fileProcessed, _) = self._vm._dom.jobInfo() -- To view, visit http://gerrit.ovirt.org/25976 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie422bead060c8ba2bfd4bfada522b91d56697841 Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
