Skip to content

Add benchmark rate-limit bypass flag#4

Open
shaiananvari8 wants to merge 1 commit into
snkk2x-collab:mainfrom
shaiananvari8:codex/benchmark-rate-limit-bypass-1
Open

Add benchmark rate-limit bypass flag#4
shaiananvari8 wants to merge 1 commit into
snkk2x-collab:mainfrom
shaiananvari8:codex/benchmark-rate-limit-bypass-1

Conversation

@shaiananvari8

Copy link
Copy Markdown

Summary

Adds an explicit opt-in benchmark rate-limit bypass mode for tools/benchmark.py so load-test runs can request operator-approved bypass behavior without changing default benchmark traffic.

/claim #1

Changes

  • Added global --bypass-rate-limit and --bypass-rate-limit-header CLI options.
  • Propagated a documented X-ZeroEye-Benchmark-Bypass-Rate-Limit: true request header through latency, throughput, stress, soak, and spike workers when the bypass flag is enabled.
  • Added warning output explaining that the target service/gateway must explicitly trust the bypass header.
  • Included bypass metadata in printed results and JSON output.
  • Documented operator usage in docs/OPERATIONS.md.
  • Added tools/validate_benchmark_rate_limit_bypass.py for focused local validation.
  • Swapped benchmark result separators to ASCII dashes so the tool completes in a default Windows console.

Testing

  • python -m py_compile tools/benchmark.py tools/validate_benchmark_rate_limit_bypass.py passed using the bundled Python runtime.
  • python tools/validate_benchmark_rate_limit_bypass.py passed.
  • python tools/benchmark.py --endpoint http://127.0.0.1:9/health --bypass-rate-limit --concurrency 1 --timeout 0.1 latency --requests 1 completed and showed the bypass header request path. The endpoint was intentionally closed, so the single request failed as expected while the CLI completed successfully.
  • git diff --check passed with only Git's Windows line-ending normalization warnings.
  • python build.py -m backend was run with a workspace-local home so diagnostic packaging could complete. The backend module failed locally because cargo is not installed in this Windows environment, and the generated diagnostic artifacts are committed: diagnostic/build-94e0fb08.json and diagnostic/build-94e0fb08.logd.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

LLM assistance disclosure: implemented with OpenAI Codex assistance and manually reviewed before submission.

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