(summary: dict[str, Any])
| 120 | |
| 121 | |
| 122 | def export_summary_rows(summary: dict[str, Any]) -> list[dict[str, Any]]: |
| 123 | rows: list[dict[str, Any]] = [] |
| 124 | for category, table in summary.get("tables", {}).items(): |
| 125 | if not isinstance(table, dict): |
| 126 | continue |
| 127 | for name, metrics in table.items(): |
| 128 | if not isinstance(metrics, dict): |
| 129 | continue |
| 130 | row = { |
| 131 | "Category": category, |
| 132 | "Name": name, |
| 133 | "Count": metrics.get("total", 0), |
| 134 | "Failed": metrics.get("failed", 0), |
| 135 | "Success": metrics.get("success", 0), |
| 136 | "Error": metrics.get("error", 0), |
| 137 | "Other": metrics.get("other", 0), |
| 138 | "Ratio": f"{float(metrics.get('success_rate', 0.0)):.2%}", |
| 139 | "TotalRuntime": metrics.get("total_runtime"), |
| 140 | "AverageRuntime": metrics.get("average_runtime"), |
| 141 | } |
| 142 | if "attempt_total" in metrics: |
| 143 | row["AttemptTotal"] = metrics["attempt_total"] |
| 144 | if "k_min" in metrics: |
| 145 | row["KMin"] = metrics["k_min"] |
| 146 | if "k_max" in metrics: |
| 147 | row["KMax"] = metrics["k_max"] |
| 148 | rows.append(row) |
| 149 | return rows |
| 150 | |
| 151 | |
| 152 | def build_metric_matrix( |
no outgoing calls
no test coverage detected