fix: count terminal failure rows in soak telemetry tolerance

This commit is contained in:
2026-07-21 04:40:06 -04:00
parent aecc5fa216
commit ab9e3d10b2
+4 -2
View File
@@ -175,13 +175,15 @@ def _scoreboard(args: argparse.Namespace, env: dict[str, str]) -> None:
except AssertionError as exc: except AssertionError as exc:
verdicts.append((name, f"FAIL — {exc}")) verdicts.append((name, f"FAIL — {exc}"))
# 行数下界=请求数(每请求至少 1 行),上界容重试放大(每请求 ≤ max_attempts 行) # 行数下界=请求数(每请求至少 1 行);上界 = 逐次尝试放大(每请求 ≤ max_attempts 行)
# + 终态行(scope 级失败/取消由 TelemetryMW 额外记一行,P5 全失败跑实证)
terminal_rows = sum(r["stats"]["failed"] + r["stats"]["cancelled"] for r in results)
_check( _check(
"遥测完备(行数≥请求数,重试容差内)", "遥测完备(行数≥请求数,重试容差内)",
sb.inv_rows_match_calls, sb.inv_rows_match_calls,
rows, rows,
expected_calls=calls, expected_calls=calls,
tolerance=calls * max(max_attempts - 1, 0) + sum(r["stats"]["cancelled"] for r in results), tolerance=calls * max(max_attempts - 1, 0) + terminal_rows,
) )
_check("call_id 唯一", sb.inv_call_ids_unique, rows) _check("call_id 唯一", sb.inv_call_ids_unique, rows)
rpm_conf = {} rpm_conf = {}