Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore old initial batch distribution logic in LoadScheduling #812

Merged
merged 2 commits into from
Oct 22, 2022

Commits on Oct 22, 2022

  1. Restore old initial batch distribution logic in LoadScheduling

    pytest orders tests for optimal sequential execution - i. e. avoiding
    unnecessary setup and teardown of fixtures. So executing tests in consecutive
    chunks is important for optimal performance.
    
    Commit 09d79ac optimized test distribution for
    the corner case, when the number of tests is less than 2 * number of nodes.
    At the same time, it made initial test distribution worse for all other cases.
    If some tests use some fixture, and these tests fit into the initial batch,
    the fixture will be created min(n_tests, n_workers) times, no matter how many
    other tests there are. With the old algorithm (before
    09d79ac), if there are enough tests not using
    the fixture, the fixture was created only once.
    
    So restore the old behavior for typical cases where the number of tests is
    much greater than the number of workers (or, strictly speaking, when there
    are at least 2 tests for every node).
    
    In my test suite, where fixtures create Docker containers, this change reduces
    total run time by 10-15%.
    
    This is a partial revert of commit 09d79ac
    amezin authored and nicoddemus committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    1f545e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc2553e View commit details
    Browse the repository at this point in the history