core.runner: decrease delay between status checks
We have a loop to check for the test status which works
like this:
status = check_status()
while not timeout or status:
status = check_status()
sleep(step)
...
And step was defined as 0.1 (sec). At least on my machine, this was making
avocado quite slow, as it was introducing a 0.1 sec sleep between each test
execution.
This commit changes step to 0.01 secs, making Avocado respond much faster.
Notice there's no significant performance penalty with this change. sleep(0.01)
is a long time for modern CPUs and schedulers.
Benchmark is quite straighforward:
TESTS=$(for i in $(seq 1 100); do echo passtest.py; done)
BEFORE:
$ time ./scripts/avocado run $TESTS --silent
real 0m14.007s
user 0m3.376s
sys 0m3.112s
AFTER:
$ time ./scripts/avocado run $TESTS --silent
real 0m4.741s
user 0m2.994s
sys 0m2.953s
Signed-off-by: NAdemar de Souza Reis Jr <areis@redhat.com>
Showing
想要评论请 注册 或 登录