diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-10-11 13:30:14 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-10-13 13:59:37 -0700 |
commit | f8fc6a898ea65e8f98a3e9e2ff9483b437a0e33f (patch) | |
tree | 5dc61933f7f47b2b280214a61f00bb7df4fd818d /yardstick/benchmark/runners | |
parent | 06f8d7a47036fe92698a9b528282a2e96eb2d32a (diff) |
task: drain background runner queues
We were not draining the queues in the background
runners.
Modify the main runner_join loop to loop over
all the runners and drain them.
The runner join method does extra work for periodic actions
so we can't change its behavior.
Instead create a new poll() method and use that
to check runner status
Change-Id: I9466ba40a6a4c45c82cedff279cbb4817c6b66ad
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/benchmark/runners')
-rwxr-xr-x | yardstick/benchmark/runners/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index 13718d793..a887fa5b3 100755 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -210,6 +210,10 @@ class Runner(object): QUEUE_JOIN_INTERVAL = 5 + def poll(self, timeout=QUEUE_JOIN_INTERVAL): + self.process.join(timeout) + return self.process.exitcode + def join(self, outputs, result, interval=QUEUE_JOIN_INTERVAL): while self.process.exitcode is None: # drain the queue while we are running otherwise we won't terminate |