VCS tests: Make smaller Arbitrary repositories to speed up long-tests 4.2x
#10588
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
Arbitraryrepo recipes can get quite large due to nesting:RepoRecipescontain a number of groups (TaggedCommitsorBranchCommits).Commits.FileUpdateorSubmoduleAdd).There's also another wrinkle in that
SubmoduleAdds contain aCommitthemselves, so square theoperationsPerCommitnumber!Then, a rough upper bound of the number of
gitcalls required for an arbitraryRepoRecipeisgroupsPerRecipe * 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-testssuite from 429 seconds to 102 seconds (a 4.2x speedup).