Skip to content

fix(benchmark-react): improve update-user-10000 convergence and document variance#3895

Closed
ntucker wants to merge 4 commits intomasterfrom
cursor/benchmark-react-10k-variance-db5e
Closed

fix(benchmark-react): improve update-user-10000 convergence and document variance#3895
ntucker wants to merge 4 commits intomasterfrom
cursor/benchmark-react-10k-variance-db5e

Conversation

@ntucker
Copy link
Copy Markdown
Collaborator

@ntucker ntucker commented Apr 10, 2026

Summary

The update-user-10000 scenario often printed [max reached] after 50 measurements without meeting the large-scenario convergence target (3% in CI, 10% locally), which produced a misleadingly wide reported margin (e.g. ±18%) even though the runner had given up early.

Changes

  • Add optional Scenario.convergentProfile (partial override of CONVERGENT_CONFIG) and merge it in bench/runner.ts per scenario.
  • For update-user-10000: allow up to 120 measurement iterations and use a 10% CI margin target in CI (12% locally) so the run can converge instead of always hitting the cap.
  • Update examples/benchmark-react/README.md, AGENTS.md, and .cursor/rules/benchmarking.mdc to describe this as a heavier-tail / scaling scenario.

Verification

Ran CI=1 yarn bench --scenario update-user-10000 --lib data-client locally; it reported [converged] after ~102 measurements with ~±10.7% margin.

No changeset: benchmark harness / docs only, not user-facing package APIs.

Open in Web Open in Cursor 

renovate bot and others added 4 commits April 10, 2026 01:43
- Admonitions: :::type Title -> :::type[Title] (Docusaurus 3.10 recommended)
- Blog truncate: <!-- truncate --> -> {/* truncate */} (JSX comments)
- /docs/getting-started/vue -> /docs/getting-started/installation
- ../api/NetworkError.md -> ../api/RestEndpoint.md#fetchResponse
- #collection-move: add explicit heading ID to Collection.move heading
- #migration-guide: use absolute path so it works from blog listing page
- #parallel-fetches -> #parallel-data-loading to match heading
- #indexes: link to Entity page instead of relative anchor
- #errorPolicy -> #errorpolicy to match explicit heading ID
…ofile

- Add optional Scenario.convergentProfile and merge in runner
- Raise max measurements and relax CI margin for 10k subscriber case
- Document heavier-tail variance in README, AGENTS, benchmarking rule
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: 5312e06

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs-site Ignored Ignored Apr 10, 2026 9:24am

@github-actions
Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 80.7 kB

ℹ️ View Unchanged
Filename Size
examples/test-bundlesize/dist/App.js 1.46 kB
examples/test-bundlesize/dist/polyfill.js 307 B
examples/test-bundlesize/dist/rdcClient.js 10.5 kB
examples/test-bundlesize/dist/rdcEndpoint.js 8 kB
examples/test-bundlesize/dist/react.js 59.7 kB
examples/test-bundlesize/dist/webpack-runtime.js 726 B

compressed-size-action

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.11%. Comparing base (df5a783) to head (5312e06).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3895   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files         153      153           
  Lines        2916     2916           
  Branches      566      566           
=======================================
  Hits         2861     2861           
  Misses         11       11           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark React

Details
Benchmark suite Current: 5312e06 Previous: d23cd80 Ratio
data-client: getlist-100 137.94 ops/s (± 5.4%) 134.23 ops/s (± 5.7%) 0.97
data-client: getlist-500 40.57 ops/s (± 5.2%) 39.22 ops/s (± 6.5%) 0.97
data-client: update-entity 312.5 ops/s (± 9.5%) 333.33 ops/s (± 9.1%) 1.07
data-client: update-user 317.54 ops/s (± 8.6%) 327.96 ops/s (± 8.5%) 1.03
data-client: getlist-500-sorted 42.37 ops/s (± 5.9%) 41.76 ops/s (± 6.5%) 0.99
data-client: update-entity-sorted 317.54 ops/s (± 3.9%) 312.5 ops/s (± 9.9%) 0.98
data-client: update-entity-multi-view 312.5 ops/s (± 6.1%) 344.83 ops/s (± 8.1%) 1.10
data-client: list-detail-switch-10 7.3 ops/s (± 6.4%) 8.04 ops/s (± 10.1%) 1.10
data-client: update-user-10000 70.42 ops/s (± 12.9%) 75.76 ops/s (± 8.6%) 1.08
data-client: invalidate-and-resolve 35.65 ops/s (± 4.8%) 34.13 ops/s (± 4.0%) 0.96
data-client: unshift-item 217.39 ops/s (± 2.4%) 222.22 ops/s (± 5.1%) 1.02
data-client: delete-item 285.71 ops/s (± 5.1%) 312.5 ops/s (± 7.3%) 1.09
data-client: move-item 185.19 ops/s (± 7.3%) 177.01 ops/s (± 6.4%) 0.96

This comment was automatically generated by workflow using github-action-benchmark.

@ntucker ntucker closed this Apr 10, 2026
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