Skip to content

Add benchmark rate limiter bypass flag#7

Merged
codeboost-tr merged 4 commits into
codeboost-tr:mainfrom
Soengkit:codex/codeboost-zeroeye-benchmark-bypass-4
Jun 19, 2026
Merged

Add benchmark rate limiter bypass flag#7
codeboost-tr merged 4 commits into
codeboost-tr:mainfrom
Soengkit:codex/codeboost-zeroeye-benchmark-bypass-4

Conversation

@Soengkit

Copy link
Copy Markdown

Summary

Adds a --disable-rate-limiter option to tools/benchmark.py so benchmark runs can bypass client-side request pacing without editing YAML configuration. Closes #4.

Changes

  • Added a CLI --disable-rate-limiter flag, available before or after the benchmark subcommand.
  • Routed throughput, stress, soak, and spike benchmark pacing through shared worker-rate helpers.
  • Bypass mode sets worker pacing to unbounded so the benchmark does not sleep between requests.
  • Added explicit error handling for invalid concurrency/RPS and rate-limiter configuration failures.
  • Updated benchmark help/doc text to describe the flag.

Testing

  • python3 -m py_compile tools/benchmark.py
  • python3 tools/benchmark.py --help | rg -- '--disable-rate-limiter'
  • python3 tools/benchmark.py throughput --help | rg -- '--disable-rate-limiter'
  • python3 tools/benchmark.py --endpoint http://127.0.0.1:9 --disable-rate-limiter throughput --duration 0
  • python3 tools/benchmark.py --endpoint http://127.0.0.1:9 throughput --disable-rate-limiter --duration 0
  • python3 tools/benchmark.py --endpoint http://127.0.0.1:9 throughput --duration 0 --target-rps 0 returned exit code 2 with a rate-limiter configuration error.
  • python3 tools/benchmark.py --endpoint http://127.0.0.1:9 spike --disable-rate-limiter --duration 0
  • python3 build.py

Build result: 7/10 modules passed locally. The passing modules were backend, frontend, market, engine, v2-market-stream, nfc-scanner, and openapi-tools. The existing failures were frailbox C compilation, missing local Java runtime for compliance, and missing Haskell Data.Yaml for openapi-haskell. diagnostic/build-e46d62e6.json is committed with the diagnostic summary. The .logd pack step did not create a logd artifact and the JSON records the pack error code.

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

@codeboost-tr

Copy link
Copy Markdown
Owner

Please run python3 build.py to generate the required build diagnostic files (.json and .logd) and commit them to this PR. PR merges are blocked without them.

@Soengkit

Copy link
Copy Markdown
Author

Added the generated diagnostic artifacts from python3 build.py in the latest commit: diagnostic/build-28f76ec5.json and diagnostic/build-28f76ec5.logd. The required diagnostic check is now passing.

@codeboost-tr codeboost-tr merged commit 89a2197 into codeboost-tr:main Jun 19, 2026
1 check passed
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.

[ BOUNTY] [Python] Add flag to disable rate limiter in benchmark tool

2 participants