replayer: wire --max-inflight-sessions cap into replay loop (B2)
Trace-driven dispatch is preserved by default (semaphore=None when the flag is not set), but operators can now cap concurrent sessions to reproduce session-admission scenarios from earlier sweeps without artificial time compression.
This commit is contained in:
@@ -19,6 +19,9 @@ def main() -> None:
|
||||
p.add_argument("--model", type=str, default="default", help="Model name for API")
|
||||
p.add_argument("--concurrency-limit", type=int, default=2000,
|
||||
help="Max concurrent HTTP requests (safety limit)")
|
||||
p.add_argument("--max-inflight-sessions", type=int, default=None,
|
||||
help="Cap on concurrent sessions (None = unlimited; "
|
||||
"trace-driven dispatch otherwise)")
|
||||
p.add_argument("--request-timeout", type=float, default=600.0)
|
||||
p.add_argument("--request-limit", type=int, default=None,
|
||||
help="Limit number of requests to replay")
|
||||
@@ -38,6 +41,7 @@ def main() -> None:
|
||||
concurrency_limit=args.concurrency_limit,
|
||||
request_timeout_s=args.request_timeout,
|
||||
request_limit=args.request_limit,
|
||||
max_inflight_sessions=args.max_inflight_sessions,
|
||||
)
|
||||
|
||||
results = asyncio.run(replay_trace(config))
|
||||
|
||||
Reference in New Issue
Block a user