Skip to content

ci: add CodSpeed benchmark coverage#669

Merged
fansenze merged 1 commit intomainfrom
feat/ci-benchmark
Apr 23, 2026
Merged

ci: add CodSpeed benchmark coverage#669
fansenze merged 1 commit intomainfrom
feat/ci-benchmark

Conversation

@simplyme0823
Copy link
Copy Markdown
Contributor

@simplyme0823 simplyme0823 commented Apr 13, 2026

Summary

  • Added a benchmark-go job in CI to run CodSpeed walltime benchmarks for ./internal/linter
  • Added a benchmark-cli job in CI to run CLI walltime benchmarks through pnpm run bench:cli
  • Updated the done job so release-branch benchmark jobs are required alongside the existing CI jobs
  • Added local benchmark entrypoints in package.json, including pnpm run bench:go and pnpm run bench:cli
  • Automatically trigger the benchmark when the branch name matches chore/release-xxx.
  • Support manually triggering the benchmark.

Related Links

see example: chore/release-xxx 👉 #748

image

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a suite of benchmarks for workspace ownership and various linter operations, including syntax, type-aware, and semantic diagnostic checks. It also adds a CodSpeed badge to the README. The review feedback highlights several opportunities to improve benchmark accuracy by moving closure allocations and slice initializations outside of the timing loops to reduce measurement noise. Additionally, it identifies a potential race condition in global benchmark sinks that should be addressed using atomic operations to ensure thread safety during parallel execution.

Comment thread cmd/rslint/programs_bench_test.go Outdated
Comment thread internal/linter/linter_bench_test.go Outdated
Comment thread tests/bench-go/linter_bench_test.go
Comment thread tests/bench-go/linter_bench_test.go
Comment thread internal/linter/linter_bench_test.go Outdated
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 13, 2026

Congrats! CodSpeed is installed 🎉

🆕 5 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Detected benchmarks


Open in CodSpeed

@simplyme0823 simplyme0823 force-pushed the feat/ci-benchmark branch 4 times, most recently from 5b55365 to a1430a8 Compare April 17, 2026 05:55
@simplyme0823 simplyme0823 changed the title Feat/ci benchmark ci: add CodSpeed benchmark coverage Apr 17, 2026
@simplyme0823 simplyme0823 force-pushed the feat/ci-benchmark branch 7 times, most recently from 92eb309 to 0f80140 Compare April 20, 2026 09:45
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 20, 2026

Deploying rslint with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0f80140
Status:🚫  Build failed.

View logs

@fansenze fansenze merged commit 815d4bc into main Apr 23, 2026
11 checks passed
@fansenze fansenze deleted the feat/ci-benchmark branch April 23, 2026 03:41
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