Make telemetry audit replay-phase aware
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ def main() -> None:
|
||||
controller = load("p6controller", HERE / "opprof_phase6_controller.py")
|
||||
solo = load("p6solo", HERE / "opprof_phase6_solo_controller.py")
|
||||
analysis = load("p6analysis", HERE / "analyze_phase6.py")
|
||||
client = load("p6client", HERE / "opprof_phase6_client.py")
|
||||
assert len(controller.CELLS) == 12
|
||||
primary = sum(3 if item.get("trap") else 2 for item in controller.CELLS.values())
|
||||
assert primary == 25
|
||||
@@ -36,6 +37,18 @@ def main() -> None:
|
||||
assert sum(solo.CELL_ESTIMATE.values()) + solo.SAFETY_HOURS == 3.44
|
||||
assert solo.next_below([.1, .2, .3], {.2, .3}) == .1
|
||||
assert solo.next_above([.1, .2, .3], {.1, .2}) == .3
|
||||
parsed = client.parser().parse_args([
|
||||
"run-anchor",
|
||||
"--study", "study.json",
|
||||
"--cell", "tp4_mns16",
|
||||
"--anchor", "0.5",
|
||||
"--tp", "4",
|
||||
"--mns", "16",
|
||||
"--base-url", "http://127.0.0.1:8000",
|
||||
"--result-dir", "out",
|
||||
"--disable-slo-early-stop",
|
||||
])
|
||||
assert parsed.disable_slo_early_stop is True
|
||||
print("phase6 tools: PASS")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user