Make telemetry audit replay-phase aware

This commit is contained in:
2026-07-14 17:18:25 +08:00
parent 791f7a8889
commit 0515ad8ecc
9 changed files with 11780 additions and 1 deletions

View File

@@ -95,7 +95,11 @@ def run_replay(args: argparse.Namespace, *, warmup: bool) -> dict[str, Any]:
base_url=args.base_url,
timeout_s=study.engine.request_timeout_s,
max_concurrency=study.trace.max_concurrency,
target_pass_rate=(0.0 if warmup else study.slo.target_pass_rate),
target_pass_rate=(
0.0
if warmup or args.disable_slo_early_stop
else study.slo.target_pass_rate
),
max_lag_s=study.trace.early_stop_max_lag_s,
max_elapsed_s=(
120.0 if warmup else _probe_drain_deadline(
@@ -162,6 +166,7 @@ def run_replay(args: argparse.Namespace, *, warmup: bool) -> dict[str, Any]:
"feasible": bool(slo_summary["feasible"]),
"early_stopped": early_stopped,
"early_stop_reason": early_stop_reason,
"slo_early_stop_disabled": bool(args.disable_slo_early_stop),
"ttft_ms": numeric([item.ttft_ms for item in outcomes]),
"tpot_ms": numeric([item.tpot_ms for item in outcomes]),
"invariants": {
@@ -240,6 +245,7 @@ def parser() -> argparse.ArgumentParser:
q.add_argument("--mns", type=int, required=True)
q.add_argument("--base-url", required=True)
q.add_argument("--result-dir", required=True)
q.add_argument("--disable-slo-early-stop", action="store_true")
return p