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

VCS tests: Make smaller Arbitrary repositories to speed up long-tests 4.2x #10588

Merged
merged 1 commit into from
Nov 27, 2024

Commits on Nov 27, 2024

  1. VCS tests: Make smaller Arbitrary repositories

    The `Arbitrary` repo recipes can get quite large due to nesting:
    
    - `RepoRecipes` contain a number of groups (`TaggedCommits` or `BranchCommits`).
    - Groups contain a number of `Commit`s.
    - Commits contain a number of operations (`FileUpdate` or `SubmoduleAdd`).
    
    There's also another wrinkle in that `SubmoduleAdd`s contain a `Commit`
    themselves, so square the `operationsPerCommit` number!
    
    Then, a rough upper bound of the number of `git` calls required for an
    arbitrary `RepoRecipe` is
    `groupsPerRecipe * commitsPerGroup * operationsPerCommit^2`.
    
    The original implementation of these instances, which chose
    reasonable-sounding size parameters of 5-15, led to a maximum of 1875
    operations per test case! No wonder they took so long!
    
    In my tests, this change reduces the time of running the `long-tests`
    suite from 429 seconds to 102 seconds (a 4.2x speedup).
    9999years authored and Mikolaj committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    351ebb2 View commit details
    Browse the repository at this point in the history