-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
test(typescript-estree): split up parse #6092
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
test(typescript-estree): split up parse #6092
Conversation
Thanks for the PR, @Beraliv! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good start, thanks for sending it!
I think some of the copy & pasted code can be trimmed down. Thoughts?
packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-error.test.ts
Outdated
Show resolved
Hide resolved
Sorry for no progress, I will do it today |
clean packages/typescript-estree/tests/lib/parse.moduleResolver.default- program-error.test.ts
clean parse.moduleResolver.default-program-success.test.ts
clear parse.moduleResolver.placeholder-error.test.ts
clear parse.moduleResolver.placeholder-success.test.ts
I've double checked performance on MacBook Air M1 again (with charger on) and it looks like that:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far, thanks for continuing to work on it! 🙌
Requesting changes on just a bit more deduplication. But this is feeling very close to merge. 😄
packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-error.test.ts
Outdated
Show resolved
Hide resolved
Moved common logic between tests to createAndPrepareParseConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, this is looking great! Thanks a bunch for all your work on this @Beraliv! 🔥
Thank you for the help and the patience! |
PR Checklist
Overview
Split
parse.test.ts
test to be more paralleliseable. When I split parseAndGenerateServices into these files:parse.moduleResolver.default-program-error.test.ts
parse.moduleResolver.default-program-success.test.ts
parse.moduleResolver.placeholder-error.test.ts
parse.moduleResolver.placeholder-success.test.ts
Performance runs
MacBook Air M1:
yarn jest parse
(no cache, main)yarn jest parse
(with cache, main)yarn jest parse
(no cache, N moduleResolver)yarn jest parse
(cache, N moduleResolver)Another check for MacBook Pro 2.3 GHz 8-Core Intel Core i9
yarn jest parse
(no cache, main)yarn jest parse
(with cache, main)yarn jest parse
(no cache, N moduleResolver)yarn jest parse
(with cache, N moduleResolver)So I think maybe parallelisation isn't working properly on my MacBook Air M1 as on MacBook Pro we see significant improvement
Another split was done here – #6049, but I closed it as it was less performant on MacBook Pro 2.3 GHz 8-Core Intel Core i9.
Commands:
hyperfine --runs 5 -p "yarn jest --clearCache" "yarn jest parse" --export-markdown performance.md
hyperfine --runs 5 "yarn jest parse" --export-markdown performance.md