unjs / rou3

🌳 Lightweight and fast rou(ter) for JavaScript
MIT License
442 stars 16 forks source link

test: add benchmark tests #116

Closed pi0 closed 3 months ago

pi0 commented 3 months ago

Add bench test scripts that compare rou3 with maximum runtime native performance (as if we just use a map of all known requests) ... final goal is to get closer to 1x by improving things.

Also bundle test makes sure we keep under promise of a specific upper limit (today: 2.5kb/1kb with all createRouter, addRoute, findRoute, matchAllRoutes)

(updated in main)

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (b7fe8b7) to head (b52f0c9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #116 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 7 7 Lines 366 366 Branches 88 88 ========================================= Hits 366 366 ```

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