summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@emc.com>2016-05-10 17:15:54 -0600
committerMark Beierl <mark.beierl@emc.com>2016-05-10 17:15:54 -0600
commitf250f3e2eb01e88adcf2f9f3c01d898ce2e5f5a9 (patch)
tree102defeceadcb19d528b670f6627460b2cab0a64
parentc999a6716e412d36b7c91e15eaaca3ab3cd2bc93 (diff)
Fix double loop bug
Change-Id: I47f20dec309d7ab8402f40f6cf09828aa134e902 Signed-off-by: Mark Beierl <mark.beierl@emc.com>
-rw-r--r--rest_server.py10
-rw-r--r--storperf/test_executor.py4
2 files changed, 8 insertions, 6 deletions
diff --git a/rest_server.py b/rest_server.py
index 7fba94a..45d77ff 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -74,14 +74,17 @@ def results_page(job_id):
key = "%s.queue-depth.%s.block-size.%s.read.latency" % \
(workload, queue_depth, block_size)
-
- print key + "=" + str(results[key])
if key in results:
rlatencies.append(results[key] / 1000)
+ else:
+ rlatencies.append(0)
+
key = "%s.queue-depth.%s.block-size.%s.write.latency" % \
(workload, queue_depth, block_size)
if key in results:
wlatencies.append(results[key] / 1000)
+ else:
+ wlatencies.append(0)
chart = Barchart()
chart.barchart3d(queue_depths, block_sizes, read_latencies, 'g',
@@ -307,9 +310,6 @@ class Job(Resource):
storperf.workloads = request.json['workload']
else:
storperf.workloads = None
- # Add block size, queue depth, number of passes here.
- if ('workload' in request.json):
- storperf.workloads = request.json['workload']
job_id = storperf.execute_workloads()
diff --git a/storperf/test_executor.py b/storperf/test_executor.py
index 6b9c441..7fdf741 100644
--- a/storperf/test_executor.py
+++ b/storperf/test_executor.py
@@ -116,7 +116,8 @@ class TestExecutor(object):
if(workload_module is None):
raise UnknownWorkload(
"ERROR: Unknown workload: " + workload)
- self.workload_modules.append(workload_module)
+ if workload_module not in self.workload_modules:
+ self.workload_modules.append(workload_module)
except ImportError, err:
raise UnknownWorkload("ERROR: " + str(err))
@@ -168,6 +169,7 @@ class TestExecutor(object):
for blocksize in blocksizes:
for iodepth in iodepths:
+
if self._terminated:
return