Skip to content
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: add benchmark with vitest + codspeed #363

Merged
merged 7 commits into from
Mar 22, 2024
Merged

test: add benchmark with vitest + codspeed #363

merged 7 commits into from
Mar 22, 2024

Conversation

danielroe
Copy link
Member

πŸ”— 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)
  • 🧹 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 danielroe self-assigned this Dec 20, 2023
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

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

❗ 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           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Copy link

vercel bot commented Mar 22, 2024

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

Copy link

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%)

Copy link

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%)

Copy link

codspeed-hq bot commented Mar 22, 2024

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)

@danielroe danielroe merged commit 30ec92e into main Mar 22, 2024
9 checks passed
@danielroe danielroe deleted the test/benchmark branch March 22, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant