Change in vdsm[master]: Only run speed() on nic device
danken at redhat.com
danken at redhat.com
Wed May 1 19:42:43 UTC 2013
Dan Kenigsberg has posted comments on this change.
Change subject: Only run speed() on nic device
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm/sampling.py
Line 371: self._log = log
Line 372: self._lastCheckTime = 0
Line 373: self._stopEvent = threading.Event()
Line 374: self._samples = []
Line 375: self.nics, bonds, _, _ = netinfo.getInterfaces()
Currently, only HostStatsThread inherits from StatsThread. But unless they are squashed together, netinfo.getInterfaces() should not be here - it is host-specific.
Line 376: self._ifids = self.nics + bonds
Line 377: self._ifrates = map(netinfo.speed, self.nics) + [0] * len(bonds)
Line 378: self._ifmacs = [''] * len(self._ifids) # fake ifmacs
Line 379: self._ncpus = 1
Line 499: def stop(self):
Line 500: self._imagesStatus.stop()
Line 501: StatsThread.stop(self)
Line 502:
Line 503: def _updateIfRates(self, hs0, hs1):
even if we don't take this optimization patch, this in-function import should better better be moved up.
Line 504:
Line 505: i = 0
Line 506: for ifid in self.nics:
Line 507: if (hs0.interfaces[ifid].operstate !=
--
To view, visit http://gerrit.ovirt.org/13839
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I721b823a28cc36498119e67061d462b780105e7b
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list