Skip to content

feat(benchmark): latency benchmark suite with CI gate (#78) - #223

Merged
imran-siddique merged 1 commit into
mainfrom
feat/benchmark-suite
Jun 7, 2026
Merged

feat(benchmark): latency benchmark suite with CI gate (#78)#223
imran-siddique merged 1 commit into
mainfrom
feat/benchmark-suite

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

  • python -m cmcp_gateway.benchmarks --provider {tpm,sev-snp,software-only} --calls N measures cedar_eval_us, audit_entry_us, end_to_end_us (p50/p95/p99)
  • 1000-call warmup before measurement, then N calls (default 10000)
  • Output JSON matches the format in docs/testing/benchmarks.md
  • Exits 1 if software-only p99 end_to_end_us > 5000 (5ms CI gate)
  • New benchmark CI job runs on main after test matrix passes, uploads results as artifact
  • benchmarks/ directory created for result files

Test plan

  • python -m pytest tests/unit/test_benchmarks.py -v — 5 tests pass
  • python -m cmcp_gateway.benchmarks --provider software-only --calls 1000 — runs and prints JSON
  • Verify p99 end_to_end_us < 5000 in output

Closes #78

🤖 Generated with Claude Code

python -m cmcp_gateway.benchmarks --provider software-only --calls 10000
measures cedar_eval_us, audit_entry_us, end_to_end_us (p50/p95/p99).
Exits 1 if software-only p99 end_to_end_us > 5000. Benchmark job added
to CI (runs on main after test matrix passes, uploads results as artifact).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 6c2bfdf into main Jun 7, 2026
1 of 8 checks passed
@imran-siddique
imran-siddique deleted the feat/benchmark-suite branch July 29, 2026 23:19
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.

[testing] Benchmark suite — latency targets from docs/testing/benchmarks.md

1 participant