diff options
author | 2015-10-19 15:37:06 +0800 | |
---|---|---|
committer | 2015-10-22 00:55:25 +0000 | |
commit | e4e8688e0633ef22b2ff0ea8ba739313d5299ecc (patch) | |
tree | 0fee27d4e504b36e9eb24530cf85a0d33fd0b463 /yardstick/benchmark/scenarios/networking/ping.py | |
parent | 9816c5aa786f7ec831c549b8ed4b5e8ef485da64 (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/networking/ping.py')
-rw-r--r-- | yardstick/benchmark/scenarios/networking/ping.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py index 41395d8d6..10964350b 100644 --- a/yardstick/benchmark/scenarios/networking/ping.py +++ b/yardstick/benchmark/scenarios/networking/ping.py @@ -45,7 +45,7 @@ class Ping(base.Scenario): self.connection = ssh.SSH(user, host, key_filename=key_filename) self.connection.wait() - def run(self, args): + def run(self, args, result): """execute the benchmark""" if "options" in args: @@ -64,11 +64,9 @@ class Ping(base.Scenario): if exit_status != 0: raise RuntimeError(stderr) - rtt = float(stdout) + result["rtt"] = float(stdout) if "sla" in args: sla_max_rtt = int(args["sla"]["max_rtt"]) - assert rtt <= sla_max_rtt, "rtt %f > sla:max_rtt(%f)" % \ - (rtt, sla_max_rtt) - - return rtt + assert result["rtt"] <= sla_max_rtt, "rtt %f > sla:max_rtt(%f); " % \ + (result["rtt"], sla_max_rtt) |