GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — chore: Update to Vitest 5 and move hook benchmarks to vitest bench (v6) by fratzinger · Pull Request #3722 · feathersjs/feathers Conversation
Member
Summary
This PR updates to Vitest 5 and moves the benchmark to Vitest 5's benchmark API. Benchmark files run in their own project, one at a time and never at the same time as tests. package.json - vitest ^3.2.4, @vitest/coverage-v8 ^3.2.4 + vitest ^5.0.5, @vitest/coverage-v8 ^5.0.5, vite ^7.3.7 + "bench": "vitest bench --run" packages/{feathers,create-feathers}/package.json - vitest ^5.0.0, @vitest/coverage-v8 ^5.0.0 (not used by `npm test`, which ran Vitest 3) packages/feathers/src/hooks/ - benchmark.test.ts Date.now() runtime < 20x baseline + benchmark.bench.ts bench.compare(baseline, hooked): median (p50) overhead < 10x vitest.config.ts benchmark.include, benchmarks excluded from coverage packages/feathers/tsconfig.json benchmarks excluded from lib/ and cjs/ .github/workflows/nodejs.yml new "Run benchmarks (non-blocking)" step with continue-on-error
No related issues, and no dependencies on other PRs. EvidenceMeasured as the ratio of hooked to baseline (p50), on Node.js 24.16 and 26.10:
Merge DangerDoor: two-way Blast Radius: small
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions- Update to Vitest 5 in the root and remove the separate Vitest versions from the packages. Vite stays on v7 since the Oxc transformer in Vite 8 only supports legacy decorators and the tests use standard decorators - The hook benchmarks were flaky because they compared single `Date.now()` measurements (a ~5ms baseline at 1ms resolution, measured at a different time than the hooked functions) while other test files ran in parallel. They now use `bench.compare()` which runs benchmark files on their own and interleaves the iterations, and assert the median overhead (at most 10x the plain function, as originally in feathersjs/hooks) - Run the benchmarks with `npm run bench` as a non-blocking CI step and exclude them from the build and coverage Co-Authored-By: Claude Opus 5.5 <[email protected]>
daffl
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |