Change in vdsm[master]: sampling: hoststats: kill sample() method
Dan Kenigsberg has submitted this change and it was merged. Change subject: sampling: hoststats: kill sample() method .. sampling: hoststats: kill sample() method HostStatsThread.sample() is a two-line method used only once. Remove it to reduce the code size, but also to make the code a little bit clearer. Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Signed-off-by: Francesco Romani Reviewed-on: https://gerrit.ovirt.org/40425 Reviewed-by: Dan Kenigsberg Continuous-Integration: Jenkins CI --- M vdsm/virt/sampling.py 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
automat...@ovirt.org has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 5: * Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
Francesco Romani has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 4: Verified+1 trivial patch, verified running a patched VDSM and checking (through [new] logs) that host samples are still collected (they are). -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
automat...@ovirt.org has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 4: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
Dan Kenigsberg has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
automat...@ovirt.org has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 3: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
automat...@ovirt.org has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 2: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 1: Verified-1 Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1644/ : FAILURE http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18413/ : SUCCESS -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 1: Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18413/ -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 1: Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1644/ -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
automat...@ovirt.org has posted comments on this change. Change subject: sampling: hoststats: kill sample() method .. Patch Set 1: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/40425 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b8903c27c34a4ba7f737aba1d88d67abec08816 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: hoststats: kill sample() method
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 --- 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 ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches