Skip to content

Speed up "make coverage"#215

Merged
stevvooe merged 1 commit into
moby:masterfrom
aaronlehmann:faster-make-coverage
Mar 29, 2016
Merged

Speed up "make coverage"#215
stevvooe merged 1 commit into
moby:masterfrom
aaronlehmann:faster-make-coverage

Conversation

@aaronlehmann
Copy link
Copy Markdown
Collaborator

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

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>
@docker-codecov-bot
Copy link
Copy Markdown

Current coverage is 57.11%

Merging #215 into master will decrease coverage by -0.20% as of 8ebe435

@@            master    #215   diff @@
======================================
  Files           43      43       
  Stmts         5281    5281       
  Branches       758     758       
  Methods          0       0       
======================================
- Hit           3027    3016    -11
- Partial        414     420     +6
- Missed        1840    1845     +5

Review entire Coverage Diff as of 8ebe435


Uncovered Suggestions

  1. +0.43% via agent/session.go#185...207
  2. +0.34% via agent/agent.go#524...541
  3. +0.34% via .../test/deepcopy.pb.go#1492...1509
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@aaronlehmann
Copy link
Copy Markdown
Collaborator Author

CI for this PR took 4:41. For another recent PR, it took 5:53.

@vieux
Copy link
Copy Markdown
Contributor

vieux commented Mar 29, 2016

LGTM ping @stevvooe

@stevvooe
Copy link
Copy Markdown
Contributor

LGTM

@stevvooe stevvooe merged commit 5ff01dc into moby:master Mar 29, 2016
@stevvooe stevvooe deleted the faster-make-coverage branch March 29, 2016 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants