-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information
Showing
1 changed file
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters