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

Parallel coverage #3407

Merged
merged 2 commits into from
Apr 28, 2017
Merged

Parallel coverage #3407

merged 2 commits into from
Apr 28, 2017

Conversation

aaronabramov
Copy link
Contributor

based on #3309
i had to resolve some conflicts (multi runner/config splitting touched the same files)

This changes the coverage reporter's _addUntestedFiles function to be
parallelized. This speeds up coverage collection on machines with multiple
cores for test suites with many untested files.
@codecov-io
Copy link

Codecov Report

Merging #3407 into master will decrease coverage by 0.02%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3407      +/-   ##
==========================================
- Coverage   64.27%   64.24%   -0.03%     
==========================================
  Files         176      177       +1     
  Lines        6538     6561      +23     
  Branches        4        4              
==========================================
+ Hits         4202     4215      +13     
- Misses       2335     2345      +10     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/TestRunner.js 31.32% <0%> (ø) ⬆️
...ackages/jest-cli/src/reporters/CoverageReporter.js 55.81% <20%> (-4.72%) ⬇️
packages/jest-cli/src/reporters/CoverageWorker.js 84.61% <84.61%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27b53ca...813cdc9. Read the comment docs.

@cpojer cpojer merged commit acbb907 into jestjs:master Apr 28, 2017
);
process.exit(1);
const exit = () => process.exit(1);
this._dispatcher
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This being async will not work as it will keep running tests until the reporters are done. You need to wait on the result of _bailIfNeeded and return Promise.resolve() otherwise. I'll send a fix.

if (result.sourceMapPath) {
this._sourceMapStore.registerURL(path, result.sourceMapPath);

const farm = workerFarm(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be able to run in band if maxWorkers is <=1.

@aaronabramov aaronabramov deleted the parallel-coverage branch May 2, 2017 03:52
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
* [CoverageReporter] Parallelize instrumentation of untested files.

This changes the coverage reporter's _addUntestedFiles function to be
parallelized. This speeds up coverage collection on machines with multiple
cores for test suites with many untested files.

* Parallel coverage (resolve conflicts)
@SimenB SimenB mentioned this pull request Jan 30, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants