Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Beraliv
Copy link
Contributor

@BeralivBeraliv commentedNov 25, 2022
edited
Loading

PR Checklist

Overview

Splitparse.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:

CommandMean [s]Min [s]Max [s]RelativeDiff ((main - branch) / main x 100%)
yarn jest parse (no cache, main)30.375 ± 0.97829.25531.4681.000%
yarn jest parse (with cache, main)29.299 ± 0.36028.85829.8331.000%
yarn jest parse (no cache, N moduleResolver)29.843 ± 0.90428.88430.8831.00-1.75%
yarn jest parse (cache, N moduleResolver)25.544 ± 0.31925.22726.0651.00-12.82%

Another check for MacBook Pro 2.3 GHz 8-Core Intel Core i9

CommandMean [s]Min [s]Max [s]RelativeDiff ((main - branch) / main x 100%)
yarn jest parse (no cache, main)31.185 ± 0.58730.76432.2211.000%
yarn jest parse (with cache, main)29.330 ± 0.05929.25329.4111.000%
yarn jest parse (no cache, N moduleResolver)24.311 ± 1.14823.21725.9921.00-22.04%
yarn jest parse (with cache, N moduleResolver)24.087 ± 3.32320.56929.3841.00-17.88%

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:

  1. No cache – hyperfine --runs 5 -p "yarn jest --clearCache" "yarn jest parse" --export-markdown performance.md
  2. With cache – hyperfine --runs 5 "yarn jest parse" --export-markdown performance.md

@typescript-eslint
Copy link
Contributor

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 onhttps://opencollective.com/typescript-eslint.

@nx-cloud
Copy link

nx-cloudbot commentedNov 25, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commitbf051b1. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 fromNxCloud.

@netlify
Copy link

netlifybot commentedNov 25, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitbf051b1
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/63c5df2b4478e800085d5ce2
😎 Deploy Previewhttps://deploy-preview-6092--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

@BeralivBeraliv changed the titleTest/parallelisation 3test(typescript-estree): split up parseNov 25, 2022
@BeralivBeraliv marked this pull request as ready for reviewNovember 25, 2022 09:04
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a 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?

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 27, 2022
@Beraliv
Copy link
ContributorAuthor

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
@Beraliv
Copy link
ContributorAuthor

Beraliv commentedDec 4, 2022
edited
Loading

I've double checked performance on MacBook Air M1 again (with charger on) and it looks like that:

CommandMean [s]Min [s]Max [s]Diff ((main - branch) / main x 100%)
yarn jest parse (no cache, main)20.380 ± 0.59919.52921.0210%
yarn jest parse (cache, main)17.924 ± 0.28917.47718.2390%
yarn jest parse (no cache, N moduleResolver)17.675 ± 0.25317.36117.996-13.27%
yarn jest parse (cache, N moduleResolver)16.216 ± 0.55615.41416.872-9.53%

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a 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. 😄

Beraliv reacted with thumbs up emoji
@JoshuaKGoldbergJoshuaKGoldberg removed the awaiting responseIssues waiting for a reply from the OP or another party labelJan 16, 2023
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a 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! 🔥

Beraliv reacted with heart emoji
@JoshuaKGoldbergJoshuaKGoldbergenabled auto-merge (squash)January 16, 2023 23:36
@Beraliv
Copy link
ContributorAuthor

Fantastic, this is looking great! Thanks a bunch for all your work on this@Beraliv! 🔥

Thank you for the help and the patience!

@JoshuaKGoldbergJoshuaKGoldberg merged commit9e4595e intotypescript-eslint:mainJan 16, 2023
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 24, 2023
@BeralivBeraliv deleted the test/parallelisation-3 branchJuly 9, 2024 19:49
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Repo: Split up parse.test.ts test to be more parallelizeable
2 participants
@Beraliv@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp