Dan Kenigsberg has uploaded a new change for review.
Change subject: eliminate sampling.BaseSample
......................................................................
eliminate sampling.BaseSample
For quite some time, BaseSample is not a common base class of anything.
It serves no meaningful abstraction, so this patch inlines into its only
user.
Change-Id: Ia1668e89ac21229cea1d5aac7ea155882f4295a0
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 2 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/29471/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 841f2f2..f87a15f 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -202,18 +202,6 @@
self.timestamp = time.time()
-class BaseSample(TimedSample):
- """
- A sample of the statistics for a process.
- """
- def __init__(self, pid, links):
- TimedSample.__init__(self)
- self.interfaces = {}
- for link in links:
- self.interfaces[link.name] = InterfaceSample(link)
- self.pidcpu = PidCpuSample(pid)
-
-
_PROC_STAT_PATH = '/proc/stat'
@@ -235,7 +223,7 @@
raise ValueError('Boot time not present')
-class HostSample(BaseSample):
+class HostSample(TimedSample):
"""
A sample of host-related statistics.
@@ -473,7 +461,7 @@
self._stopEvent.set()
def sample(self):
- hs = HostSample(self._pid, getLinks())
+ hs = HostSample(self._pid)
return hs
def run(self):
--
To view, visit
http://gerrit.ovirt.org/29471
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1668e89ac21229cea1d5aac7ea155882f4295a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>