diff options
-rw-r--r-- | rest_server.py | 10 | ||||
-rw-r--r-- | storperf/test_executor.py | 4 |
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 |