Change in vdsm[master]: virt: sampling: factor numa stats in a method

fromani at redhat.com fromani at redhat.com
Fri Oct 3 14:55:33 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: virt: sampling: factor numa stats in a method
......................................................................

virt: sampling: factor numa stats in a method

This patch moves the NUMA stats collection into
an helper method, to make the code more consistent
and a bit tidier.
No functional changes.

Change-Id: Ifd78ed5637e21cf321c88ddcfe0801fd8d1e90d5
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/33782/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 1eebb69..559bf5c 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -605,6 +605,11 @@
 
             stats[dName].update(dLatency)
 
+    def _getNumaStats(self, stats):
+        info = numaUtils.getVmNumaNodeRuntimeInfo(self._vm)
+        if info:
+            stats['vNodeRuntimeInfo'] = info
+
     def _getVmJobs(self, stats):
         sInfo, eInfo, sampleInterval = self.sampleVmJobs.getStats()
 
@@ -630,11 +635,7 @@
         self._getDiskLatency(stats)
         self._getBalloonStats(stats)
         self._getVmJobs(stats)
-
-        vmNumaNodeRuntimeMap = numaUtils.getVmNumaNodeRuntimeInfo(self._vm)
-        if vmNumaNodeRuntimeMap:
-            stats['vNodeRuntimeInfo'] = vmNumaNodeRuntimeMap
-
+        self._getNumaStats(stats)
         self._getCpuTuneInfo(stats)
         self._getCpuCount(stats)
         self._getUserCpuTuneInfo(stats)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd78ed5637e21cf321c88ddcfe0801fd8d1e90d5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list