Skip to content

Add CodSpeed performance benchmarks and CI integration - #4

Open
codspeed[bot] wants to merge 1 commit into
masterfrom
codspeed/wizard-1782288860087
Open

codspeed[bot] wants to merge 1 commit into
masterfrom
codspeed/wizard-1782288860087

Conversation

@codspeed

@codspeed codspeed Bot commented Jun 24, 2026

Copy link
Copy Markdown

Summary

This PR sets up continuous performance measurement with CodSpeed for OpenAlice.

It adds a vitest-based benchmark harness using the official @codspeed/vitest-plugin, an initial set of benchmarks covering hot-path pure functions, and a GitHub Actions workflow that runs the benchmarks on every push and pull request.

Changes

  • Added @codspeed/vitest-plugin as a dev dependency.
  • Added vitest.bench.config.ts, a dedicated benchmark config that loads the CodSpeed plugin and mirrors the workspace path aliases from vitest.config.ts (so benchmarks can import from src/* and the workspace packages without a prior dist/ build).
  • Added benchmarks/core.bench.ts with benchmarks for CPU-bound, deterministic helpers:
    • parseDuration (scheduling / cron / pump timers)
    • compareVersions and getRepoSlug (version awareness)
    • inferCredentialVendor and resolveAnthropicAuthMode (credential inference)
  • Added a bench script to package.json.
  • Added .github/workflows/codspeed.yml, mirroring the existing CI's pnpm + Node 22 setup. It uses OIDC authentication and runs in CodSpeed's simulation instrument.
  • Added the CodSpeed badge to the README.

Verification

The benchmarks were run locally with the CodSpeed CLI in simulation mode and uploaded successfully, linked to the 2233admin/OpenAlice repository. All four benchmarks execute and report results.

Next steps

  • Once merged, CodSpeed will track performance on every PR and flag regressions.
  • Expand coverage by adding benchmarks for additional hot paths (e.g. entity store, event log, compaction) as they evolve.
  • You can run the suite locally with pnpm bench.

@repowise-bot

repowise-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

✅ Health: 10.0

🚨 Change risk: 7.8/10 (high)
This change's risk is driven by:

  • more lines added than baseline
  • more scattered than baseline

📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-06-24 08:19 UTC
Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot

@codspeed

codspeed Bot commented Jun 24, 2026

Copy link
Copy Markdown
Author

Congrats! CodSpeed is installed 🎉

🆕 4 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
codspeed Bot marked this pull request as ready for review June 24, 2026 08:20

This branch has not been deployed

No deployments
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