Skip to content

Add CodSpeed for continuous performance monitoring#67

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

Add CodSpeed for continuous performance monitoring#67
codspeed-hq[bot] wants to merge 1 commit intomainfrom
setup-codspeed-1768026904915

Conversation

@codspeed-hq
Copy link

@codspeed-hq codspeed-hq bot commented Jan 10, 2026

Summary

This PR sets up CodSpeed for continuous performance monitoring in CI, enabling automated detection of performance regressions.

Changes

  • Dependencies: Downgraded vitest from v4 to v3 and added @codspeed/vitest-plugin@5.0.1
  • Configuration: Updated vitest.config.ts to include the CodSpeed plugin
  • Benchmarks: Created benchmark files for core functionality:
    • benchmarks/schema-builder.bench.ts - GraphQL schema parsing, building, and merging operations
    • benchmarks/directive-parser.bench.ts - Directive parsing and schema generation
  • CI/CD: Added .github/workflows/codspeed.yml with OIDC authentication
  • Documentation: Added CodSpeed badge to README

Version Note

This PR includes a downgrade from vitest v4 to v3 because CodSpeed's vitest plugin does not yet support v4. Once v4 support is added (see tracking issue above), we can upgrade back to v4.

Test Plan

  • Benchmarks run successfully locally with pnpm bench
  • CodSpeed workflow runs successfully in CI
  • Performance data is collected and reported on CodSpeed dashboard

Next Steps

Once this PR is merged:

  1. Monitor the CodSpeed workflow to ensure it completes successfully
  2. Review initial performance baselines on the CodSpeed dashboard
  3. Set up performance regression checks on future PRs

- Downgrade vitest from v4 to v3 for CodSpeed compatibility
- Add @codspeed/vitest-plugin for performance instrumentation
- Create benchmark suites for schema operations and directive parsing
- Add GitHub Actions workflow with OIDC authentication
- Add CodSpeed badge to README
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 75.33% 2477 / 3288
🔵 Statements 75.33% 2477 / 3288
🔵 Functions 76.3% 132 / 173
🔵 Branches 80.35% 589 / 733
File CoverageNo changed files found.
Generated in workflow #326 for commit a47f30d by the Vitest Coverage Report Action

@codspeed-hq
Copy link
Author

codspeed-hq bot commented Jan 10, 2026

Congrats! CodSpeed is installed 🎉

🆕 8 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


Open in CodSpeed

@codspeed-hq codspeed-hq bot marked this pull request as ready for review January 10, 2026 06:42
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.

0 participants