Skip to content

chore: add performance package with a project service hyperfine comparison #7870

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

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Nov 2, 2023

PR Checklist

Overview

Adds two forms of very rudimentary performance testing:

  • comparison job: . Runs a matrix of commands on generated code with my old favorite https://github.com/sharkdp/hyperfine. Uses the Mac runner purely so that brew install can be used.
    • The generated code is 50% .js files that aren't included in the TSConfig and 50% .ts files that are included.
  • summary job: runs a direct console.table showing the results of running the two kinds of linting once
    • yarn test:project: Traditional project: true
    • yarn test:service EXPERIMENTAL_useProjectService
    • yarn test:service:seeded: EXPERIMENTAL_useProjectService, with allowDefaultProjectFallbackFilesGlobs

Example output from yarn test:summary on my M1 Max Mac ((index) is generated file count):

┌─────────┬────────────────────────────────┬────────────────────────────────┬────────────────────────────────┐
│ (index) │            project             │            service             │        service (seeded)        │
├─────────┼────────────────────────────────┼────────────────────────────────┼────────────────────────────────┤
│    5    │ '1.10 real 2.07 user 0.12 sys' │ '1.91 real 3.53 user 0.22 sys' │ '1.74 real 3.31 user 0.20 sys' │
│   10    │ '1.12 real 2.07 user 0.11 sys' │ '1.90 real 3.62 user 0.23 sys' │ '1.94 real 3.62 user 0.24 sys' │
│   25    │ '1.14 real 2.17 user 0.12 sys' │ '2.32 real 4.12 user 0.32 sys' │ '2.33 real 4.15 user 0.33 sys' │
│   50    │ '1.22 real 2.27 user 0.13 sys' │ '3.12 real 5.03 user 0.50 sys' │ '3.12 real 5.03 user 0.49 sys' │
│   75    │ '1.41 real 2.65 user 0.14 sys' │ '3.85 real 5.76 user 0.63 sys' │ '3.84 real 5.76 user 0.65 sys' │
│   100   │ '1.37 real 2.70 user 0.13 sys' │ '4.71 real 6.55 user 0.83 sys' │ '4.59 real 6.42 user 0.81 sys' │
│   125   │ '1.43 real 2.74 user 0.14 sys' │ '5.31 real 7.15 user 0.99 sys' │ '5.28 real 7.10 user 0.98 sys' │
│   150   │ '1.49 real 2.82 user 0.14 sys' │ '6.12 real 7.93 user 1.15 sys' │ '6.10 real 7.92 user 1.13 sys' │
│   175   │ '1.59 real 3.05 user 0.15 sys' │ '6.98 real 8.75 user 1.28 sys' │ '6.92 real 8.74 user 1.28 sys' │
│   200   │ '1.58 real 3.08 user 0.15 sys' │ '7.57 real 9.25 user 1.38 sys' │ '7.56 real 9.21 user 1.43 sys' │
└─────────┴────────────────────────────────┴────────────────────────────────┴────────────────────────────────┘

Includes roughly the changes from #7752 for testing purposes. But an earlier, scrappier version of them.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

Copy link

netlify bot commented Nov 2, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 2958c48
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/654a1141dc53b900081a3c67
😎 Deploy Preview https://deploy-preview-7870--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🔴 down 9 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@JoshuaKGoldberg JoshuaKGoldberg changed the title perf: add performance package with a project service hyperfine comparison chore: add performance package with a project service hyperfine comparison Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant