renderLogsCompactVerbose adds extra columns and sections for deeper analysis.
(data LogsData)
| 223 | |
| 224 | // renderLogsCompactVerbose adds extra columns and sections for deeper analysis. |
| 225 | func renderLogsCompactVerbose(data LogsData) { |
| 226 | logsCompactLog.Printf("Rendering %d runs in verbose compact format", data.Summary.TotalRuns) |
| 227 | |
| 228 | s := data.Summary |
| 229 | |
| 230 | // [summary] extended |
| 231 | summaryParts := []string{ |
| 232 | "runs=" + strconv.Itoa(s.TotalRuns), |
| 233 | "duration=" + s.TotalDuration, |
| 234 | "action_min=" + fmt.Sprintf("%.1f", s.TotalActionMinutes), |
| 235 | "turns=" + strconv.Itoa(s.TotalTurns), |
| 236 | "errors=" + strconv.Itoa(s.TotalErrors), |
| 237 | "warnings=" + strconv.Itoa(s.TotalWarnings), |
| 238 | "missing_tools=" + strconv.Itoa(s.TotalMissingTools), |
| 239 | "github_api=" + strconv.Itoa(s.TotalGitHubAPICalls), |
| 240 | "episodes=" + strconv.Itoa(s.TotalEpisodes), |
| 241 | } |
| 242 | if s.TotalAIC > 0 { |
| 243 | summaryParts = append(summaryParts, "aic="+formatCompactAIC(s.TotalAIC)) |
| 244 | } |
| 245 | if len(s.EngineCounts) > 0 { |
| 246 | parts := make([]string, 0, len(s.EngineCounts)) |
| 247 | for engine, count := range s.EngineCounts { |
| 248 | parts = append(parts, engine+":"+strconv.Itoa(count)) |
| 249 | } |
| 250 | summaryParts = append(summaryParts, "engines="+strings.Join(parts, ",")) |
| 251 | } |
| 252 | if s.OutcomeAccepted > 0 || s.OutcomeRejected > 0 { |
| 253 | summaryParts = append(summaryParts, |
| 254 | "accepted="+strconv.Itoa(s.OutcomeAccepted), |
| 255 | "rejected="+strconv.Itoa(s.OutcomeRejected), |
| 256 | "ignored="+strconv.Itoa(s.OutcomeIgnored), |
| 257 | "pending="+strconv.Itoa(s.OutcomePending), |
| 258 | ) |
| 259 | if s.OutcomeAcceptanceRate > 0 { |
| 260 | summaryParts = append(summaryParts, "acceptance="+fmt.Sprintf("%.0f%%", s.OutcomeAcceptanceRate*100)) |
| 261 | } |
| 262 | if s.OutcomeWasteRate > 0 { |
| 263 | summaryParts = append(summaryParts, "waste="+fmt.Sprintf("%.0f%%", s.OutcomeWasteRate*100)) |
| 264 | } |
| 265 | } |
| 266 | fmt.Fprintf(os.Stdout, "[summary] %s\n", strings.Join(summaryParts, " ")) |
| 267 | |
| 268 | if len(data.Runs) == 0 { |
| 269 | return |
| 270 | } |
| 271 | |
| 272 | // [runs] verbose aligned table |
| 273 | fmt.Fprintln(os.Stdout, "[runs]") |
| 274 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) |
| 275 | fmt.Fprintln(w, "RUNID\tWORKFLOW\tENGINE\tSTATUS\tDUR\tTOKENS\tAIC\tTURNS\tERR\tWARN\tEVENT\tACTOR\tTBT\tCLASS\tCREATED\tBRANCH") |
| 276 | |
| 277 | for _, r := range data.Runs { |
| 278 | status := r.Conclusion |
| 279 | if status == "" { |
| 280 | status = r.Status |
| 281 | } |
| 282 | if status == "skipped" || status == "cancelled" { |
no test coverage detected