Skip to content

feat: add API benchmark suite with autocannon#57

Open
MichisGitIsKing wants to merge 1 commit into
SecureBananaLabs:mainfrom
MichisGitIsKing:feat/api-benchmarks
Open

feat: add API benchmark suite with autocannon#57
MichisGitIsKing wants to merge 1 commit into
SecureBananaLabs:mainfrom
MichisGitIsKing:feat/api-benchmarks

Conversation

@MichisGitIsKing
Copy link
Copy Markdown

Summary

Complete API benchmark suite covering all /api/ endpoints.

What's included

  • benchmarks/run-suite.mjs: Main runner using autocannon with warmup, smoke mode, and threshold gating
  • benchmarks/endpoints.mjs: All 20 endpoints with realistic payloads
  • benchmarks/thresholds.json: Per-endpoint p99 latency limits
  • .env.benchmark: Configurable connections, duration, target host
  • npm run benchmark: Full suite
  • npm run benchmark:smoke: CI-friendly low-concurrency check that exits non-zero on threshold failure

Metrics captured per endpoint

  • p50, p95, p99 latency (ms)
  • Requests per second
  • Error rate (%)
  • TTFB (p99)

Output

  • JSON + markdown report in /benchmarks/results/
  • latest.json and latest.md symlinks for easy access

Fixes #30

- Benchmark all /api/ endpoints with realistic payloads
- npm run benchmark (full) and npm run benchmark:smoke (CI)
- .env.benchmark template for configuring target host
- p50/p95/p99 latency, RPS, error rate, TTFB per endpoint
- JSON + markdown output in /benchmarks/results/
- thresholds.json with p99 limits per endpoint
- Smoke mode exits non-zero if threshold exceeded

Fixes SecureBananaLabs#30
github-actions Bot added a commit that referenced this pull request May 17, 2026
@BossChaos
Copy link
Copy Markdown

Code Review

PR: feat: add API benchmark suite with autocannon by @MichisGitIsKing

  • ✅ Performance benchmark suite

Wallet: 0xdaE5d307339074A24F579dB48e7c639359D94904

Code review for SecureBananaLabs bug-bounty

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.

Benchmark APIs with p50, p95, p99 latency, RPS, error rate and TTFB

2 participants