Skip to content

Comments

Setup CodSpeed for continuous performance testing#111

Open
codspeed-hq[bot] wants to merge 1 commit intomainfrom
setup-codspeed-1770609726586
Open

Setup CodSpeed for continuous performance testing#111
codspeed-hq[bot] wants to merge 1 commit intomainfrom
setup-codspeed-1770609726586

Conversation

@codspeed-hq
Copy link

@codspeed-hq codspeed-hq bot commented Feb 9, 2026

Summary

This PR integrates CodSpeed into the Semantic-Next repository to enable continuous performance monitoring of the codebase. CodSpeed provides reliable performance measurements in CI environments using specialized instrumentation that eliminates environmental noise.

Changes Made

  • Installed @codspeed/vitest-plugin v5.1.0 for performance benchmarking integration
  • Created benchmark configuration (vitest.bench.config.js) with CodSpeed plugin
  • Added example benchmarks in the benchmarks/ directory:
    • arrays.bench.js: Benchmarks for array utility functions (unique, flatten, sortBy, groupBy, intersection, difference, uniqueItems)
    • strings.bench.js: Benchmarks for string utility functions (kebabToCamel, camelToKebab, capitalize, truncate, escapeHTML, joinWords)
  • Configured GitHub Actions workflow (.github/workflows/codspeed.yml):
    • Uses OIDC authentication (recommended security practice)
    • Runs in simulation mode for consistent measurements
    • Triggers on push and pull requests to main and feature branches
  • Added CodSpeed badge to README.md for visibility into performance trends

Test Plan

  • Benchmarks run successfully with npx vitest bench --run --config vitest.bench.config.js
  • Benchmarks run successfully with CodSpeed CLI: codspeed run --mode simulation --skip-upload -- npx vitest bench --run --config vitest.bench.config.js
  • All benchmarks execute and produce results for array and string utilities
  • Code formatted with dprint according to repository standards
  • Verify GitHub Actions workflow executes successfully
  • Confirm CodSpeed reports appear on pull request
  • Validate performance data is uploaded to CodSpeed dashboard

Next Steps

After this PR is merged, the team can:

  1. Add more benchmarks for other critical code paths (component rendering, query operations, reactivity system)
  2. Set up performance budgets and regression detection
  3. Use CodSpeed flame graphs to identify optimization opportunities
  4. Track performance trends across releases

The example benchmarks demonstrate CodSpeed integration and provide a foundation for comprehensive performance testing across the framework.

- Install @codspeed/vitest-plugin@5.1.0 for benchmark instrumentation
- Create vitest benchmark configuration with CodSpeed plugin integration
- Add example benchmarks for array utilities (unique, flatten, sortBy, groupBy, intersection, difference)
- Add example benchmarks for string utilities (kebabToCamel, camelToKebab, capitalize, truncate, escapeHTML)
- Configure GitHub Actions workflow with OIDC authentication
- Use simulation mode for consistent performance measurements
- Add CodSpeed badge to README for performance tracking visibility
@vercel
Copy link

vercel bot commented Feb 9, 2026

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

Project Deployment Actions Updated (UTC)
semantic-next Ready Ready Preview, Comment Feb 9, 2026 4:21am

Request Review

@github-actions github-actions bot added CI modifies continuous integration Docs Modifies documentation Tooling labels Feb 9, 2026
@codspeed-hq
Copy link
Author

codspeed-hq bot commented Feb 9, 2026

Congrats! CodSpeed is installed 🎉

🆕 29 new benchmarks were detected.

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

Detected benchmarks


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Open in CodSpeed

@codspeed-hq codspeed-hq bot marked this pull request as ready for review February 9, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI modifies continuous integration Docs Modifies documentation Tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants