From 0e0d5994418b04d7001e81b97e3c85862740cea2 Mon Sep 17 00:00:00 2001 From: iomgaa Date: Tue, 21 Jul 2026 14:37:49 -0400 Subject: [PATCH] chore: print per-source reason chain on soak call failure --- tools/soak/run_soak.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/soak/run_soak.py b/tools/soak/run_soak.py index 23e04e0..c9d1d7a 100644 --- a/tools/soak/run_soak.py +++ b/tools/soak/run_soak.py @@ -158,7 +158,11 @@ async def _worker_async(args: argparse.Namespace, worker_idx: int) -> None: raise except Exception as exc: # 记分板从遥测读错误分布;这里只计数 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: return (