diff options
author | 2018-03-23 09:05:56 +0000 | |
---|---|---|
committer | 2018-03-23 09:05:56 +0000 | |
commit | d90c544053e3ca5ec016f2c4c62003b965c52af8 (patch) | |
tree | c08aa8434417411463581b7aedfda32d0b052f4a /yardstick/benchmark/scenarios/base.py | |
parent | 94431babb856f079812aa518ee562f763057263a (diff) | |
parent | bf892d9cf62b6bc64ea76d8b69a8fe3751cabd75 (diff) |
Merge "Add "Scenario" class wait methods for runners"
Diffstat (limited to 'yardstick/benchmark/scenarios/base.py')
-rw-r--r-- | yardstick/benchmark/scenarios/base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yardstick/benchmark/scenarios/base.py b/yardstick/benchmark/scenarios/base.py index 3b88ade7d..58a02805c 100644 --- a/yardstick/benchmark/scenarios/base.py +++ b/yardstick/benchmark/scenarios/base.py @@ -14,6 +14,7 @@ # under the License. import abc +import time import six from stevedore import extension @@ -52,6 +53,14 @@ class Scenario(object): """Default teardown implementation for Scenario classes""" pass + def pre_run_wait_time(self, time_seconds): + """Time waited before executing the run method""" + pass + + def post_run_wait_time(self, time_seconds): + """Time waited after executing the run method""" + time.sleep(time_seconds) + @staticmethod def get_types(): """return a list of known runner type (class) names""" |