Skip to content

docs(bench): adopt clearer sticky comment benchmark layout - #386

Merged
joe-bell merged 5 commits into
mainfrom
cursor/bench-sticky-comment-test-2c4f
Jul 12, 2026
Merged

joe-bell merged 5 commits into
mainfrom
cursor/bench-sticky-comment-test-2c4f

Conversation

@joe-bell

@joe-bell joe-bell commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Description

Improves the sticky PR benchmark comment so contributors can scan results without benchmark-domain context.

Comment layout (compare.ts)

  • Short intro: compares this PR against the latest published npm versions
  • One table per package, rows ordered runtime-first
  • Task labels annotated inline: (runtime), (static), (static + runtime)
  • Baseline headers simplified to version-only for stable (0.7.1) and `version` (`beta`) for beta cva
  • Plain-language footer explaining CI-generated numbers should be verified locally before treating large swings as real

Benchmark fixtures (*.bench.ts)

  • Internal scenario names renamed to plain language (Create component, Call component, Join class names, etc.)
  • compare.ts maps those internal names to the display labels shown in the comment

Tests

  • Rendering/order assertions updated in compare.test.ts

This branch also exercised the sticky comment workflow end-to-end during development; the temporary package-source test markers were removed before landing the final UX changes.

Additional context

Example rendered task row:

**cva** (runtime)<br />_component call with defaults_

Absolute numbers between cva and class-variance-authority remain non-comparable — each table is intended to be read against its own published baseline only.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the Style Guide.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
Open in Web Open in Cursor 

Temporary no-op JSDoc markers in cva and class-variance-authority so a PR
can exercise the benchmark workflow and sticky PR comment infrastructure.
Revert after confirming CI.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
cva a770bf9 Commit Preview URL

Branch Preview URL
Jul 12 2026, 08:52 AM

@github-actions

Copy link
Copy Markdown
Contributor

Benchmarks

Comparing this PR's local benchmark run against the published npm versions (baselines resolved from each package's npm dist-tags — beta for cva, latest for class-variance-authority). Higher ops/s is better. Shared CI runners are noisy — treat deltas within ±5% as noise. Moves beyond that band are marked 🟢 (faster than the baseline) or 🔴 (slower).

class-variance-authority

Task This PR 0.7.1 (release) Δ
cva: create 15,283,049 ops/s ±0.07% 13,684,726 ops/s ±0.27% 🟢 +11.7%
cva: call defaults 612,435 ops/s ±0.10% 609,421 ops/s ±0.17% +0.5%
cva: call with props 101,245 ops/s ±0.17% 99,810 ops/s ±0.16% +1.4%
cx: many args 5,714,733 ops/s ±0.19% 5,986,164 ops/s ±0.09% -4.5%
compose: two components 516,359 ops/s ±0.15% 522,628 ops/s ±0.17% -1.2%

cva

Task This PR 1.0.0-beta.6 (prerelease) Δ
cva: create 1,951,015 ops/s ±0.40% 1,936,430 ops/s ±0.28% +0.8%
cva: call defaults 617,331 ops/s ±0.14% 622,119 ops/s ±0.16% -0.8%
cva: call with props 97,907 ops/s ±0.14% 95,862 ops/s ±0.16% +2.1%
cx: many args 5,298,824 ops/s ±0.11% 4,857,684 ops/s ±0.10% 🟢 +9.1%
composes: two components 253,584 ops/s ±0.16% 256,408 ops/s ±0.16% -1.1%

Commit 1efda0b · Node v24.18.0 · linux x64 · 2026-07-12T07:03:26.185Z

Metrics are produced by the untrusted PR benchmark job and validated for shape only — they are not authenticated. Treat large swings as a signal to investigate locally, not as proof of a regression.

Rename benchmark scenarios to plain-language create/call labels and add a
short "How to read this" section to the sticky PR comment. Simplify the
intro copy above the tables and allow parentheses in validated task names.

Reverts the temporary package-source test markers from the earlier sticky
comment verification push.
@cursor cursor Bot changed the title test(ci): verify benchmark sticky PR comment docs(bench): clarify benchmark labels and PR comment guidance Jul 12, 2026
Render class-name generation and joining benchmarks before one-time component
creation and composition. Add concise headings and guidance so contributors
can identify the primary runtime signal at a glance.
@cursor cursor Bot changed the title docs(bench): clarify benchmark labels and PR comment guidance docs(bench): prioritize typical-use results Jul 12, 2026
@joe-bell joe-bell mentioned this pull request Jul 12, 2026
5 of 8 tasks
@joe-bell joe-bell changed the title docs(bench): prioritize typical-use results docs(bench): clarify typical-usage in bench results Jul 12, 2026
Render runtime-first task labels with static/runtime annotations, simplify
baseline column headers, refresh the intro and disclaimer copy, and keep a
single table per package without extra section headings.
@cursor cursor Bot changed the title docs(bench): clarify typical-usage in bench results docs(bench): adopt clearer sticky comment benchmark layout Jul 12, 2026
@cursor
cursor Bot marked this pull request as ready for review July 12, 2026 18:08
@joe-bell
joe-bell merged commit 5e18d7f into main Jul 12, 2026
10 checks passed
@joe-bell
joe-bell deleted the cursor/bench-sticky-comment-test-2c4f branch November 20, 2026 14:55
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.

2 participants