Skip to content
Source
Sign inSign up
TanStack/store

test(store): add core benchmarks and CodSpeed CI #374

OpenSheraff(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/374/headopened

🎯 Changes

The existing derived benchmark combines graph construction, subscription, and an update, making reactive graph regressions hard to isolate. Add 24 core benchmarks covering basic operations, fan-out, observed and unobserved graphs, equality fast paths, subscription lifecycle, dynamic dependencies, batching, and field selections.

Fixtures, verification, and cleanup stay outside timing. Unobserved dependency reads and writes are measured separately; lifecycle checks verify notifications before a read can repair missing connections. The application workload measures 200 single-field updates across 100 selections in every invocation, with untimed checks of each notification's field, value, and update index. This exercises the whole sequence even when CodSpeed measures only one invocation.

Add a dedicated Node benchmark config with coverage/typechecking disabled and a pinned CodSpeed simulation workflow for PRs, main, and manual dispatch. Framework comparisons remain outside this suite. Pin @codspeed/vitest-plugin to 6.0.0-beta.2 for Node 24/Vite 8 compatibility; document baseline collection before enabling regression thresholds.

Validation

  • All 24 native benchmarks pass; all 24 CodSpeed analysis-runner workloads pass a Node 24 smoke test without CPU instrumentation.
  • Core tests: 63 passed, 1 skipped; all four configured TypeScript versions pass. ESLint, formatting, Knip, and Sherif pass.
  • pnpm test:pr --base=upstream/main passes all 108 tasks. The initial sandboxed run crashed in five Angular example builds; those builds passed outside the sandbox on Node 24, with the other 103 tasks served from the successful local cache.
  • Actual Linux CPU simulation reports and uploads still need CI validation and an enabled CodSpeed repository.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).
    1. Important

      Draft PR not reviewed

      Draft PRs are not automatically reviewed by default.

      • Trigger a manual review

      To automatically review draft PRs, update your CodeRabbit configuration:

      reviews:
        auto_review:
          drafts: true

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 7a1fe3d9f247ad4a7c58d72f2d95128fa63c33c1

      CommandStatusDurationResult
      nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded1m 8sView ↗
      nx run-many --target=build --exclude=examples/**✅ Succeeded<1sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-09-28 21:34:55 UTC

    3. socket-security[bot](GitHub profile, opens in a new tab)commented

      Review the following changes in direct dependencies. Learn more about Socket for GitHub.

      Diff Package Supply Chain
      Security
      Vulnerability Quality Maintenance License
      Added@​codspeed/​vitest-plugin@​6.0.0-beta.21001009796100

      View full report

    4. pkg-pr-new[bot](GitHub profile, opens in a new tab)commented
      @tanstack/angular-store

      npm i https://pkg.pr.new/@tanstack/angular-store@374

      @tanstack/lit-store

      npm i https://pkg.pr.new/@tanstack/lit-store@374

      @tanstack/octane-store

      npm i https://pkg.pr.new/@tanstack/octane-store@374

      @tanstack/preact-store

      npm i https://pkg.pr.new/@tanstack/preact-store@374

      @tanstack/react-store

      npm i https://pkg.pr.new/@tanstack/react-store@374

      @tanstack/solid-store

      npm i https://pkg.pr.new/@tanstack/solid-store@374

      @tanstack/store

      npm i https://pkg.pr.new/@tanstack/store@374

      @tanstack/svelte-store

      npm i https://pkg.pr.new/@tanstack/svelte-store@374

      @tanstack/vue-store

      npm i https://pkg.pr.new/@tanstack/vue-store@374

      commit: a6fdc0b

Sign in to join this conversation.