diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-03-23 09:05:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-23 09:05:56 +0000 |
commit | d90c544053e3ca5ec016f2c4c62003b965c52af8 (patch) | |
tree | c08aa8434417411463581b7aedfda32d0b052f4a /yardstick/benchmark/runners/duration.py | |
parent | 94431babb856f079812aa518ee562f763057263a (diff) | |
parent | bf892d9cf62b6bc64ea76d8b69a8fe3751cabd75 (diff) |
Merge "Add "Scenario" class wait methods for runners"
Diffstat (limited to 'yardstick/benchmark/runners/duration.py')
-rw-r--r-- | yardstick/benchmark/runners/duration.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py index fbf72a74c..60b0348c3 100644 --- a/yardstick/benchmark/runners/duration.py +++ b/yardstick/benchmark/runners/duration.py @@ -66,6 +66,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg, data = {} errors = "" + benchmark.pre_run_wait_time(interval) + try: result = method(data) except AssertionError as assertion: @@ -77,7 +79,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg, errors = assertion.args # catch all exceptions because with multiprocessing we can have un-picklable exception # problems https://bugs.python.org/issue9400 - except Exception: + except Exception: # pylint: disable=broad-except errors = traceback.format_exc() LOG.exception("") else: @@ -86,7 +88,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg, # if we do timeout we don't care about dropping individual KPIs output_queue.put(result, True, QUEUE_PUT_TIMEOUT) - time.sleep(interval) + benchmark.post_run_wait_time(interval) benchmark_output = { 'timestamp': time.time(), |