Speed up "make coverage"#215
Merged
Merged
Conversation
The current "coverage" target runs a separate "go test" on each individual package, but does not save build artifacts between invocations. Thus, each each package that "go test" gets called against (including those with no tests) require rebuilding the whole set of dependencies. This takes a long time. Run "go test -i" to prebuild dependencies before running the actual tests. This effectively warms a build cache that gets used by the following "go test" invocation, as well as subsequent ones for packages that overlap in dependencies. Before: real 2m22.252s user 6m8.059s sys 0m45.162s After: real 1m5.280s user 1m23.572s sys 0m11.932s Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Current coverage is
|
Collaborator
Author
|
CI for this PR took 4:41. For another recent PR, it took 5:53. |
Contributor
|
LGTM ping @stevvooe |
Contributor
|
LGTM |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 current "coverage" target runs a separate "go test" on each
individual package, but does not save build artifacts between
invocations. Thus, each each package that "go test" gets called against
(including those with no tests) require rebuilding the whole set of
dependencies. This takes a long time.
Run "go test -i" to prebuild dependencies before running the actual
tests. This effectively warms a build cache that gets used by the
following "go test" invocation, as well as subsequent ones for packages
that overlap in dependencies.
Before:
After: