Add run_in_background attribute to scenarios 57/4357/8
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Fri, 11 Dec 2015 14:50:22 +0000 (15:50 +0100)
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>
Tue, 15 Dec 2015 17:12:55 +0000 (17:12 +0000)
commit05c1840c9c4dda154c9c5d00ff3cd23ba202330b
treee440c79354739c5a9921757226e9d9128ee5766d
parent3dfc4babd729b64757608945536e180e8c8ef271
Add run_in_background attribute to scenarios

This change adds the possibility to run scenarios as "background
tasks".

Background scenarios/tasks:
  - are started before all "normal scenarios"
  - runs in parallel with "normal scenarios"
  - terminates when all "normal scenarios" have completed
    their tasks

They are intended as a way to perform background tasks, e.g. collect
data such as cpuload etc, in parallel with the execution of normal
benchmarking scenarios.

Note that we already have the 'run_in_parallel' attribute but
this attribute has a couple of issues and do not solve all the
uses cases.

Change-Id: I9c5230bfdbbb66030f57b658ce1db87ff2c2d62b
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
samples/background-task.yaml [new file with mode: 0644]
tests/unit/cmd/commands/test_task.py
yardstick/benchmark/runners/arithmetic.py
yardstick/benchmark/runners/base.py
yardstick/benchmark/runners/duration.py
yardstick/benchmark/runners/iteration.py
yardstick/benchmark/runners/sequence.py
yardstick/cmd/commands/task.py