-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[CoverageReporter] Parallelize instrumentation of untested files. #3309
Conversation
this is beautiful! how much faster was it able to run on your project? |
Currently gather timings, but we're estimating savings at close to 3 minutes for our CI runs. |
Well, this is saving ~50 seconds locally. I expect more on our CI servers, but enabling that without publishing somewhere is proving to be a bit difficult. |
Codecov Report
@@ Coverage Diff @@
## master #3309 +/- ##
=========================================
- Coverage 64.93% 64.9% -0.03%
=========================================
Files 176 177 +1
Lines 6514 6537 +23
Branches 4 4
=========================================
+ Hits 4230 4243 +13
- Misses 2283 2293 +10
Partials 1 1
Continue to review full report at Codecov.
|
0b0a7fc
to
4214d21
Compare
Rebased on latest changes, I don't think I broke anything... seeing this in the output of yarn test.
|
Can you run |
It's fixed now, you can rebase once more. |
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.
4214d21
to
fb0b49f
Compare
@thymikee Rebased and ran the command that you posted, now I'm seeing the below locally...
This is a side note, and probably worthy of a separate issue, but I think the contributing guide can use some work... I'm entirely unfamiliar with |
Thanks for reporting! I'll take a look a this later. If you have any ideas on how to make contributing guide more comprehensive, please send a PR :) |
I wish I did... If it weren't giving me problems I'd PR updates, sort of a catch 22. Maybe when I get some spare time I'll further familiarize myself. |
@DmitriiAbramov @thymikee ping (i don't know how to open source and don't yet have a feel for what's too much noise) pong |
Let's just wait until Dmitrii finds some time to review this. In the meantime it's pretty ok to ping him once in a couple of days, so he'll eventually get there :D |
sorry :) i'll be updating Jest internally at fb again in a couple of days and i'll test this feature! |
i had to resolve some issues with the current master (we kinda rewrote everything in those files 🙂) |
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. |
Summary
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.
Test plan
Wrote tests for the new worker file,
npm link
d jest-cli and tested against a large local repo, tested entire repo viayarn test
.