diff options
author | David Sommerseth <davids@redhat.com> | 2012-12-07 19:29:14 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-12-07 19:34:16 +0100 |
commit | ffd636b0b5fd614ccae9201b5350ce2143c9d038 (patch) | |
tree | 7edf34ee7866bb7c6df41a5ef14b59f89d37300d /rteval/modules | |
parent | e4ca831bf2d23065665e1603ddca2f033a8285a2 (diff) | |
download | rteval-ffd636b0b5fd614ccae9201b5350ce2143c9d038.tar.gz rteval-ffd636b0b5fd614ccae9201b5350ce2143c9d038.tar.xz rteval-ffd636b0b5fd614ccae9201b5350ce2143c9d038.zip |
Make the rtevalModulePrototype::_WorkloadAlive() method public
Added a few minor log line adjustments too
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'rteval/modules')
-rw-r--r-- | rteval/modules/__init__.py | 14 | ||||
-rw-r--r-- | rteval/modules/loads/hackbench.py | 2 | ||||
-rw-r--r-- | rteval/modules/loads/kcompile.py | 2 | ||||
-rw-r--r-- | rteval/modules/measurement/HWLatDetect.py | 2 | ||||
-rw-r--r-- | rteval/modules/measurement/cyclictest.py | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py index 6daeae7..5ac2c62 100644 --- a/rteval/modules/__init__.py +++ b/rteval/modules/__init__.py @@ -115,9 +115,9 @@ class rtevalModulePrototype(threading.Thread): raise NotImplementedError("_WorkloadTask() method must be implemented in the %s module" % self._name) - def _WorkloadAlive(self): + def WorkloadAlive(self): "Required module method, which should return True if the workload is still alive" - raise NotImplementedError("_WorkloadAlive() method must be implemented in the %s module" % self._name) + raise NotImplementedError("WorkloadAlive() method must be implemented in the %s module" % self._name) def _WorkloadCleanup(self): @@ -147,15 +147,15 @@ class rtevalModulePrototype(threading.Thread): if self.shouldStart(): break - self._log(Log.DEBUG, "starting %s module" % self._module_type) + self._log(Log.DEBUG, "Starting %s workload" % self._module_type) while not self.shouldStop(): # Run the workload self._WorkloadTask() if self.shouldStop(): break - if not self._WorkloadAlive(): - self._log(Log.DEBUG, "%s workload died! bailng out..." % self._module_type) + if not self.WorkloadAlive(): + self._log(Log.DEBUG, "%s workload stopped running." % self._module_type) break time.sleep(1.0) self._log(Log.DEBUG, "stopping %s workload" % self._module_type) @@ -356,12 +356,12 @@ start their workloads yet""" for (modname, mod) in self.__modules: if all_running_pass: # We requiring all modules to run to pass - ret &= mod._WorkloadAlive() + ret &= mod.WorkloadAlive() else: # We require only a single module to run to pass # This is used by f.ex. measurement modules, running # serialised - ret |= mod._WorkloadAlive() + ret |= mod.WorkloadAlive() return ret diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py index c3da7d9..cf09cfa 100644 --- a/rteval/modules/loads/hackbench.py +++ b/rteval/modules/loads/hackbench.py @@ -105,7 +105,7 @@ class Hackbench(CommandLineLoad): self.__err_sleep = 60.0 - def _WorkloadAlive(self): + def WorkloadAlive(self): # As hackbench is short-lived, lets pretend it is always alive return True diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py index d43e523..d0fb444 100644 --- a/rteval/modules/loads/kcompile.py +++ b/rteval/modules/loads/kcompile.py @@ -152,7 +152,7 @@ class Kcompile(CommandLineLoad): stderr=self.__errfd) - def _WorkloadAlive(self): + def WorkloadAlive(self): # Let _WorkloadTask() kick off new runs, if it stops - thus # kcompile will always be alive return True diff --git a/rteval/modules/measurement/HWLatDetect.py b/rteval/modules/measurement/HWLatDetect.py index 46c99ff..e642315 100644 --- a/rteval/modules/measurement/HWLatDetect.py +++ b/rteval/modules/measurement/HWLatDetect.py @@ -73,7 +73,7 @@ class HWLatDetectRunner(rtevalModulePrototype): self.__hwlat.detect() - def _WorkloadAlive(self): + def WorkloadAlive(self): return self.__running diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py index 8e4f407..a04b52d 100644 --- a/rteval/modules/measurement/cyclictest.py +++ b/rteval/modules/measurement/cyclictest.py @@ -253,7 +253,7 @@ class Cyclictest(rtevalModulePrototype): self.__started = True - def _WorkloadAlive(self): + def WorkloadAlive(self): if self.__started: return self.__cyclicprocess.poll() is None else: |