summaryrefslogtreecommitdiffstats
path: root/storperf/workloads/_base_workload.py
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@emc.com>2016-04-25 09:55:03 -0400
committerMark Beierl <mark.beierl@emc.com>2016-04-25 10:51:31 -0400
commit311eee3bec00d5acc32b6eba76a7ff0d1990f4b2 (patch)
tree9fe4ee0f33687ebaed1c82ff3bea0d569039cc78 /storperf/workloads/_base_workload.py
parent07a375f25ee831100ecf21e7bb9c1bdcd3b960f5 (diff)
Job run lifecycle rework
Change the way slave jobs are managed so that they are in step with each other, and we can track the overall thread that is running them. This lays groundwork for STORPERF-20 and STORPERF-44 JIRA: STORPERF-33 STORPERF-43 Change-Id: Iaff48a2823ba85d6512e9782fd9091a72639835c Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'storperf/workloads/_base_workload.py')
-rw-r--r--storperf/workloads/_base_workload.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/storperf/workloads/_base_workload.py b/storperf/workloads/_base_workload.py
index f7c14ad..4eccc08 100644
--- a/storperf/workloads/_base_workload.py
+++ b/storperf/workloads/_base_workload.py
@@ -13,7 +13,7 @@ import logging
class _base_workload(object):
def __init__(self):
- self.logger = logging.getLogger(__name__)
+ self.logger = logging.getLogger(self.__class__.__name__)
self.default_filesize = "100%"
self.filename = '/dev/vdb'
self.options = {
@@ -25,12 +25,19 @@ class _base_workload(object):
'numjobs': '1',
'loops': '2',
'output-format': 'json',
- 'status-interval': '600'
+ 'status-interval': '60'
}
self.invoker = None
+ self.remote_host = None
+ self.id = None
def execute(self):
+ if self.invoker is None:
+ raise ValueError("No invoker has been set")
+
args = []
+ self.invoker.remote_host = self.remote_host
+ self.invoker.callback_id = self.fullname
if self.filename.startswith("/dev"):
self.options['size'] = "100%"
@@ -52,3 +59,19 @@ class _base_workload(object):
def setup(self):
pass
+
+ @property
+ def remote_host(self):
+ return str(self._remote_host)
+
+ @remote_host.setter
+ def remote_host(self, value):
+ self._remote_host = value
+
+ @property
+ def fullname(self):
+ return str(self.id) + "." + \
+ self.__class__.__name__ + "." + \
+ str(self.remote_host).replace(".", "-") + \
+ ".queue-depth." + str(self.options['iodepth']) + \
+ ".block-size." + str(self.options['bs'])