aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/compute/cyclictest.py
diff options
context:
space:
mode:
authorhoujingwen <houjingwen@huawei.com>2015-10-19 15:37:06 +0800
committerHou Jingwen <houjingwen@huawei.com>2015-10-22 00:55:25 +0000
commite4e8688e0633ef22b2ff0ea8ba739313d5299ecc (patch)
tree0fee27d4e504b36e9eb24530cf85a0d33fd0b463 /yardstick/benchmark/scenarios/compute/cyclictest.py
parent9816c5aa786f7ec831c549b8ed4b5e8ef485da64 (diff)
Update sla check for scenarios
This patch modify the question that SLA check result is not complete. JIRA: YARDSTICK-172 Change-Id: I10438390baee92caf00dbfcdbdb833823ff8ce31 Signed-off-by: houjingwen <houjingwen@huawei.com>
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/cyclictest.py')
-rw-r--r--yardstick/benchmark/scenarios/compute/cyclictest.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/yardstick/benchmark/scenarios/compute/cyclictest.py b/yardstick/benchmark/scenarios/compute/cyclictest.py
index aaa98b881..595986f8a 100644
--- a/yardstick/benchmark/scenarios/compute/cyclictest.py
+++ b/yardstick/benchmark/scenarios/compute/cyclictest.py
@@ -78,7 +78,7 @@ class Cyclictest(base.Scenario):
self.setup_done = True
- def run(self, args):
+ def run(self, args, result):
"""execute the benchmark"""
default_args = "-m -n -q"
@@ -102,19 +102,20 @@ class Cyclictest(base.Scenario):
if status:
raise RuntimeError(stderr)
- data = json.loads(stdout)
+ result.update(json.loads(stdout))
if "sla" in args:
- for t, latency in data.items():
+ sla_error = ""
+ for t, latency in result.items():
if 'max_%s_latency' % t not in args['sla']:
continue
sla_latency = int(args['sla']['max_%s_latency' % t])
latency = int(latency)
- assert latency <= sla_latency, "%s latency %d > " \
- "sla:max_%s_latency(%d)" % (t, latency, t, sla_latency)
-
- return data
+ if latency > sla_latency:
+ sla_error += "%s latency %d > sla:max_%s_latency(%d); " % \
+ (t, latency, t, sla_latency)
+ assert sla_error == "", sla_error
def _test():