1. 13 10月, 2016 2 次提交
    • A
      core.runner: optimize the waiting for early test status · 2d041bcf
      Ademar de Souza Reis Jr 提交于
      The loop that waits for the early test status has a call to sleep(0), which
      turns it into an almost busy-loop. Changing it to sleep(0.01) consumes less CPU
      without performance degradation (might actually make things run faster according
      to my tests).
      
      This change also makes it more consistent with the similar loop
      for the actual test status.
      
      On my machine, before this change running "passtest.py" 100 times would result
      in almost 250000 calls to time.sleep(). After the change, the number gets down
      to 600 (tracked via python cProfile module).
      Signed-off-by: NAdemar de Souza Reis Jr <areis@redhat.com>
      2d041bcf
    • A
      core.runner: decrease delay between status checks · 2d08dda2
      Ademar de Souza Reis Jr 提交于
      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>
      2d08dda2
  2. 11 10月, 2016 2 次提交
  3. 10 10月, 2016 7 次提交
  4. 09 10月, 2016 3 次提交
  5. 07 10月, 2016 15 次提交
  6. 05 10月, 2016 11 次提交