aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/runners/base.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-10-11 13:30:14 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-10-13 13:59:37 -0700
commitf8fc6a898ea65e8f98a3e9e2ff9483b437a0e33f (patch)
tree5dc61933f7f47b2b280214a61f00bb7df4fd818d /yardstick/benchmark/runners/base.py
parent06f8d7a47036fe92698a9b528282a2e96eb2d32a (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/base.py')
-rwxr-xr-xyardstick/benchmark/runners/base.py4
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