Francesco Romani has uploaded a new change for review.
Change subject: vm: add direct import of advancedstats helpers
......................................................................
vm: add direct import of advancedstats helpers
This is purely a transitional patch towards
the move of VmStatsThread from vm.py to sampling.py.
This patch adds directly import of the VmStatsThread
dependencies, in order to make the move of such class
exactly a trivial matter of cut/paste plus fixing imports,
with exactly zero changes needed to VmStatsThread itself.
Thus the final patch will be more easily
verifiable.
Change-Id: I6b009f4a0cb0179fa1f1b74774ba61fd6638d8a9
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 10 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/28480/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 0e6f291..3b8a16b 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -45,6 +45,7 @@
from vdsm.config import config
from vdsm.define import ERROR, NORMAL, doneCode, errCode
from vdsm.netinfo import DUMMY_BRIDGE
+from vdsm.sampling import AdvancedStatsFunction, AdvancedStatsThread
from vdsm.utils import isVdsmImage
from storage import outOfProcess as oop
from storage import sd
@@ -147,44 +148,44 @@
pass
-class VmStatsThread(sampling.AdvancedStatsThread):
+class VmStatsThread(AdvancedStatsThread):
MBPS_TO_BPS = 10 ** 6 / 8
def __init__(self, vm):
- sampling.AdvancedStatsThread.__init__(self, log=vm.log, daemon=True)
+ AdvancedStatsThread.__init__(self, log=vm.log, daemon=True)
self._vm = vm
self.highWrite = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._highWrite,
config.getint('vars', 'vm_watermark_interval')))
self.updateVolumes = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._updateVolumes,
config.getint('irs', 'vol_size_sample_interval')))
self.sampleCpu = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._sampleCpu,
config.getint('vars', 'vm_sample_cpu_interval'),
config.getint('vars', 'vm_sample_cpu_window')))
self.sampleDisk = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._sampleDisk,
config.getint('vars', 'vm_sample_disk_interval'),
config.getint('vars', 'vm_sample_disk_window')))
self.sampleDiskLatency = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._sampleDiskLatency,
config.getint('vars',
'vm_sample_disk_latency_interval'),
config.getint('vars', 'vm_sample_disk_latency_window')))
self.sampleNet = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._sampleNet,
config.getint('vars', 'vm_sample_net_interval'),
config.getint('vars', 'vm_sample_net_window')))
self.sampleBalloon = (
- sampling.AdvancedStatsFunction(
+ AdvancedStatsFunction(
self._sampleBalloon,
config.getint('vars', 'vm_sample_balloon_interval'),
config.getint('vars', 'vm_sample_balloon_window')))
--
To view, visit
http://gerrit.ovirt.org/28480
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b009f4a0cb0179fa1f1b74774ba61fd6638d8a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>