Change in vdsm[master]: Monitor bridges using vdsStats

danken at redhat.com danken at redhat.com
Thu Oct 31 08:58:01 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Monitor bridges using vdsStats
......................................................................


Patch Set 4: Code-Review-1

(2 comments)

please split the code-refactoring from the bug-solving.

....................................................
File vdsm/sampling.py
Line 371:         threading.Thread.__init__(self)
Line 372:         self._log = log
Line 373:         self._stopEvent = threading.Event()
Line 374:         self._samples = []
Line 375:         self._ncpus = 1
this assignment is not useful.
Line 376:         self._updateIfidsIfrates()
Line 377:         # in bytes-per-second
Line 378:         self._lineRate = (sum(self._ifrates) or 1000) * (10 ** 6) / 8
Line 379:         self._lastSampleTime = time.time()


Line 416:             if not self._stopEvent.isSet():
Line 417:                 self._log.error("Error while sampling stats", exc_info=True)
Line 418: 
Line 419:     def get(self):
Line 420:         stats = self._getInterfacesStats()
the original code first collected host stats, then took interface stats. is there any need to reverse the order?
Line 421:         stats['cpuSysVdsmd'] = stats['cpuUserVdsmd'] = 0.0
Line 422:         stats['storageDomains'] = {}
Line 423:         if self._imagesStatus._cif.irs:
Line 424:             self._imagesStatus._refreshStorageDomains()


-- 
To view, visit http://gerrit.ovirt.org/16227
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If73565bf62f339e338d65b0200a1ba7f1131b706
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Šebek <psebek at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Petr Šebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list