chore: print per-source reason chain on soak call failure

This commit is contained in:
2026-07-21 14:37:49 -04:00
parent 69968f2e8b
commit 0e0d599441
+5 -1
View File
@@ -158,7 +158,11 @@ async def _worker_async(args: argparse.Namespace, worker_idx: int) -> None:
raise raise
except Exception as exc: # 记分板从遥测读错误分布;这里只计数 except Exception as exc: # 记分板从遥测读错误分布;这里只计数
stats["failed"] += 1 stats["failed"] += 1
print(f"[w{worker_idx}] 调用失败: {type(exc).__name__}: {exc}", flush=True) chain = getattr(exc, "per_source_reasons", None) or {}
print(
f"[w{worker_idx}] 调用失败: {type(exc).__name__}: {exc} 链={chain}",
flush=True,
)
def _should_stop() -> bool: def _should_stop() -> bool:
return ( return (