aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-10-03 09:00:07 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-03 09:00:07 +0000
commit0ddf777a4d0621f19ad2017292b8d2c548d5e038 (patch)
tree3bc95c8d5a70c4c2b7da8a779fd85740828276d1 /yardstick/benchmark
parent7237241a396871d637f9906c1fc93a8587a7b726 (diff)
parent7d5ff45a3b793f5e50b4a32b2438ab11fed6c899 (diff)
Merge "NSB PROX NFVi Test does not stop after reaching expected precision"
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r--yardstick/benchmark/runners/duration.py3
-rw-r--r--yardstick/benchmark/runners/proxduration.py3
-rw-r--r--yardstick/benchmark/scenarios/base.py3
-rw-r--r--yardstick/benchmark/scenarios/networking/vnf_generic.py3
4 files changed, 10 insertions, 2 deletions
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py
index 14fd8bb47..55c3690fd 100644
--- a/yardstick/benchmark/runners/duration.py
+++ b/yardstick/benchmark/runners/duration.py
@@ -106,7 +106,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
sequence += 1
- if (errors and sla_action is None) or time.time() > timeout or aborted.is_set():
+ if ((errors and sla_action is None) or time.time() > timeout
+ or aborted.is_set() or benchmark.is_ended()):
LOG.info("Worker END")
break
diff --git a/yardstick/benchmark/runners/proxduration.py b/yardstick/benchmark/runners/proxduration.py
index 61a468fd3..e217904b9 100644
--- a/yardstick/benchmark/runners/proxduration.py
+++ b/yardstick/benchmark/runners/proxduration.py
@@ -112,7 +112,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
sequence += 1
- if (errors and sla_action is None) or time.time() > timeout or aborted.is_set():
+ if ((errors and sla_action is None) or time.time() > timeout
+ or aborted.is_set() or benchmark.is_ended()):
LOG.info("Worker END")
break
diff --git a/yardstick/benchmark/scenarios/base.py b/yardstick/benchmark/scenarios/base.py
index 90a87ac29..1737bb942 100644
--- a/yardstick/benchmark/scenarios/base.py
+++ b/yardstick/benchmark/scenarios/base.py
@@ -50,6 +50,9 @@ class Scenario(object):
def run(self, *args):
"""Entry point for scenario classes, called from runner worker"""
+ def is_ended(self):
+ return False
+
def teardown(self):
"""Default teardown implementation for Scenario classes"""
pass
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py
index 6d68c5e64..20fff61ed 100644
--- a/yardstick/benchmark/scenarios/networking/vnf_generic.py
+++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py
@@ -63,6 +63,9 @@ class NetworkServiceTestCase(scenario_base.Scenario):
self.bin_path = get_nsb_option('bin_path', '')
self._mq_ids = []
+ def is_ended(self):
+ return self.traffic_profile is not None and self.traffic_profile.is_ended()
+
def _get_ip_flow_range(self, ip_start_range):
"""Retrieve a CIDR first and last viable IPs