Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Feb 27, 2024

This PR adds benchmark to the example plugins (and later move it into official plugins).

Note

This PR includes 2 libs for benchmark testing. At them moment I'm unsure about the results and opened tinylibs/tinybench#71.
I will also wait for a couple of runs in the CI and maybe run more tests on my local machine. In a follow up PR I want to move it under our released plugins.

This plugin should execute the already existing benchmarks and generate audits of them.

In this PR:

  • moved mock folder
  • add benchmark-js to examples/plugins
    • tests
    • docs
    • logic
    • add target perf
  • introduce tools to run perf benchmarks more organised
  • refactor utils/perf to use new tooling
  • added error if --tsconfig file could not resolve + tests

Example md report:
audits-readme-example

Related:

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 utils 🛠️ tooling labels Feb 27, 2024
@github-actions github-actions bot added 🦾 CI/CD Continuous integration and deployment 🧩 coverage-plugin labels Mar 2, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit 3268310 with source commit 4a8c678.

🏷️ Categories

🏷️ Category ⭐ Current score ⭐ Previous score 🔄 Score change
Custom checks 🟡 68 🟡 67 ↑ +1.4
Performance 🟡 69 🟡 68 ↑ +0.8
Code coverage 🟡 66 🟡 67 ↓ −0.8
Code style 🟢 100 🟢 99 ↑ +0.4
Updates 🟡 68 🟡 68 ↑ +0.3
Accessibility 🟢 100 🟢 100
Best Practices 🟢 100 🟢 100
SEO 🟡 86 🟡 86
PWA 🔴 38 🔴 38
Bug prevention 🟢 100 🟢 100
Security 🟡 80 🟡 80

🗃️ Groups

👍 3 groups improved, 👎 1 group regressed
🔌 Plugin 🗃️ Group ⭐ Current score ⭐ Previous score 🔄 Score change
Lighthouse Performance 🟡 69 🟡 68 ↑ +0.8
Code coverage Code coverage metrics 🟡 66 🟡 67 ↓ −0.8
ESLint Suggestions 🟢 100 🟢 99 ↑ +0.4
JS Packages NPM outdated dependencies 🟡 68 🟡 68 ↑ +0.3

17 other groups are unchanged.

🛡️ Audits

👍 8 audits improved, 👎 5 audits regressed, 9 audits changed without impacting score
🔌 Plugin 🛡️ Audit 📏 Current value 📏 Previous value 🔄 Value change
Lighthouse JavaScript execution time 🟩 1.1 s 🟥 1.4 s ↓ −25 %
ESLint String literals should not be duplicated 🟩 passed 🟥 1 warning ↓ −100 %
Lighthouse First Contentful Paint 🟩 1.3 s 🟨 2.3 s ↓ −45 %
Lighthouse First Meaningful Paint 🟩 1.3 s 🟨 2.3 s ↓ −44 %
Lighthouse Total Blocking Time 🟥 1,360 ms 🟥 1,090 ms ↑ +25 %
Lighthouse Speed Index 🟩 2.6 s 🟩 3.4 s ↓ −22 %
Lighthouse Max Potential First Input Delay 🟥 540 ms 🟥 680 ms ↓ −20 %
Lighthouse Time to Interactive 🟩 3.7 s 🟨 3.8 s ↓ −5 %
JS Packages Outdated NPM dev dependencies. 🟥 41 outdated package versions (24 major, 12 minor, 5 patch) 🟥 40 outdated package versions (24 major, 12 minor, 4 patch) ↑ +3 %
Lighthouse Largest Contentful Paint 🟨 3.0 s 🟨 3.0 s ↑ +2 %
Code coverage Function coverage 🟨 58 % 🟨 59 % ↓ −2 %
Code coverage Line coverage 🟨 64 % 🟨 65 % ↓ −2 %
Code coverage Branch coverage 🟨 82 % 🟨 82 %  +0 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 465 KiB 🟩 Total size was 467 KiB ↓ +0 %
Lighthouse Minimizes main-thread work 🟥 4.4 s 🟥 5.6 s ↓ −22 %
Lighthouse Uses efficient cache policy on static assets 🟨 14 resources found 🟨 14 resources found ↓ +0 %
Lighthouse Properly size images 🟥 Potential savings of 326 KiB 🟥 Potential savings of 327 KiB ↑ +350 %
Lighthouse Metrics 🟩 3670 🟩 3848 ↓ −5 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 0 ms ↑ +400 %
Lighthouse Initial server response time was short 🟩 Root document took 10 ms 🟩 Root document took 0 ms ↑ +350 %
ESLint Disallow magic numbers 🟥 8 warnings 🟥 4 warnings ↑ +100 %
Lighthouse Server Backend Latencies 🟩 10 ms 🟩 20 ms ↓ −20 %

501 other audits are unchanged.

matejchalk
matejchalk previously approved these changes Apr 10, 2024
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhoton BioPhoton requested a review from matejchalk April 14, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 core 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants