#!/usr/bin/env python3 """Summarize an e2e results.json as text (offline helper for docs/e2e-run.md; not shipped).""" import json import sys d = json.load(open(sys.argv[1])) for s in d["scenarios"]: n = len(s["checks"]) bad = [c for c in s["checks"] if not c["ok"]] print(f"## {s['name']}: {n - len(bad)}/{n} checks passed, {s['seconds']}s" + (" ERROR" if s["error"] else "")) for c in bad: print(f" FAIL {c['name']} :: {c['detail'][:200]}") if s["error"]: print(" ERROR " + s["error"][-600:]) for k, v in s["metrics"].items(): if k in ("env_after", "server_metrics_after", "soak_samples"): continue print(f" {k} = {json.dumps(v)[:240]}") for note in s["notes"]: print(f" note: {note[:240]}")