Francesco Romani has uploaded a new change for review. Change subject: sampling: hoststats: kill sample() method ......................................................................
sampling: hoststats: kill sample() method HostStatsThread.sample() is a two-line method used only once. Remove it for the sake of code brevity, with no reduction of code clarity, possibly an increase of. Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/sampling.py 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/40425/1 diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py index 8878120..7349b9f 100644 --- a/vdsm/virt/sampling.py +++ b/vdsm/virt/sampling.py @@ -569,17 +569,13 @@ def stop(self): self._stopEvent.set() - def sample(self): - hs = HostSample(self._pid) - return hs - def run(self): try: # wait a bit before starting to sample time.sleep(self._sampleInterval) while not self._stopEvent.isSet(): try: - sample = self.sample() + sample = HostSample(self._pid) self._samples.append(sample) if len(self._samples) == 1: self._CONNLOG.debug('%s', sample.to_connlog()) -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches