magic-regexp icon indicating copy to clipboard operation
magic-regexp copied to clipboard

test: add benchmark with vitest + codspeed

Open danielroe opened this issue 1 year ago • 1 comments

🔗 Linked issue

❓ Type of change

  • [ ] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [ ] 👌 Enhancement (improving an existing functionality like performance)
  • [ ] ✨ New feature (a non-breaking change that adds functionality)
  • [x] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This adds basic benchmarking (probably quite naive).

📝 Checklist

  • [ ] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

danielroe avatar Dec 20 '23 20:12 danielroe

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (892a9e9) to head (44b4b56). Report is 18 commits behind head on main.

:exclamation: Current head 44b4b56 differs from pull request most recent head 95d9b36. Consider uploading reports for the commit 95d9b36 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #363   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          629       629           
  Branches        65        65           
=========================================
  Hits           629       629           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 20 '23 20:12 codecov[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
magic-regexp-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 10:21am

vercel[bot] avatar Mar 22 '24 10:03 vercel[bot]

Diagnostics Comparison:

Click to expand
Metric Previous New Status
Files 350 353 ▲ (+0.85%)
Lines 135509 135639 ▲ (+0.10%)
Identifiers 143990 144122 ▲ (+0.09%)
Symbols 246415 246569 ▲ (+0.06%)
Types 50550 50661 ▲ (+0.22%)
Instantiations 606613 606641 ▲ (+0.00%)
Memory used 276396K 274590K ▼ (-0.66%)
I/O read 0.03s 0.02s ▼ (-50.00%)
I/O write 0s 0s ± (0.00%)
Parse time 1s 0.99s ± (-1.01%)
Bind time 0.39s 0.38s ± (-2.63%)
Check time 2.27s 2.22s ± (-2.25%)
Emit time 0.1s 0.1s ± (0.00%)
Total time 3.76s 3.69s ± (-1.90%)

github-actions[bot] avatar Mar 22 '24 10:03 github-actions[bot]

Diagnostics Comparison:

Click to expand
Metric Previous New Status
Files 350 353 ▲ (+0.85%)
Lines 135509 135639 ▲ (+0.10%)
Identifiers 143990 144122 ▲ (+0.09%)
Symbols 246415 246569 ▲ (+0.06%)
Types 50550 50661 ▲ (+0.22%)
Instantiations 606613 606641 ▲ (+0.00%)
Memory used 274865K 275283K ▲ (+0.15%)
I/O read 0.02s 0.03s ▲ (+33.33%)
I/O write 0s 0s ± (0.00%)
Parse time 0.99s 1.11s ± (+10.81%)
Bind time 0.38s 0.39s ± (+2.56%)
Check time 2.18s 2.23s ± (+2.24%)
Emit time 0.1s 0.1s ± (0.00%)
Total time 3.65s 3.82s ± (+4.45%)

github-actions[bot] avatar Mar 22 '24 10:03 github-actions[bot]

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 6 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks

  • ignores code without imports from magic-regexp (2.5 ms)
  • ignores non-JS files (2.5 ms)
  • preserves context for dynamic regexps (13.7 ms)
  • respects how users import library (16.7 ms)
  • statically replaces regexps where possible (19.3 ms)
  • transforms vue script blocks (37.6 ms)

codspeed-hq[bot] avatar Mar 22 '24 10:03 codspeed-hq[bot]