Fix branch follower performance status visibility
This commit is contained in:
@@ -110,6 +110,7 @@ function renderStatusHuman(payload: Record<string, unknown>, _options: ParsedOpt
|
||||
const next = asOptionalRecord(payload.next);
|
||||
const errors = Array.isArray(payload.errors) ? payload.errors : [];
|
||||
const timingRows = followers.flatMap(timingRowsForFollower).slice(0, 48);
|
||||
const performanceRows = followers.flatMap(performanceRowsForFollower).slice(0, 24);
|
||||
const evidenceRows = followers.flatMap(evidenceRowsForFollower).slice(0, 48);
|
||||
const reconcileRows = followers.flatMap(reconcileRowsForFollower).slice(0, 48);
|
||||
const rawStateRows = followers.flatMap(rawStateRowsForFollower).slice(0, 24);
|
||||
@@ -123,6 +124,7 @@ function renderStatusHuman(payload: Record<string, unknown>, _options: ParsedOpt
|
||||
"",
|
||||
table(["FOLLOWER", "PHASE", "ADAPTER", "OBSERVED", "TARGET", "TRIGGERED", "SUCCEEDED", "IN_FLIGHT", "BUDGET", "MESSAGE"], rows),
|
||||
timingRows.length === 0 ? "" : `\nSTAGE TIMINGS\n${table(["FOLLOWER", "STAGE", "STATUS", "SECONDS", "BUDGET", "OBJECT"], timingRows)}`,
|
||||
performanceRows.length === 0 ? "" : `\nSLOW STAGES\n${table(["FOLLOWER", "STAGE", "STATUS", "SECONDS", "SOURCE", "OBJECT"], performanceRows)}`,
|
||||
evidenceRows.length === 0 ? "" : `\nEVIDENCE\n${table(["FOLLOWER", "TYPE", "STATUS", "DETAIL", "OBJECT"], evidenceRows)}`,
|
||||
reconcileRows.length === 0 ? "" : `\nRECONCILE TIMELINE\n${table(["FOLLOWER", "STEP", "STATUS", "SECONDS", "STARTED", "OBJECT"], reconcileRows)}`,
|
||||
rawStateRows.length === 0 ? "" : `\nRAW STATE DIAGNOSTIC\n${table(["FOLLOWER", "STATE_BYTES", "COMMAND", "TIMELINE", "STEPS", "TIMELINE_BYTES", "REASON"], rawStateRows)}`,
|
||||
@@ -231,6 +233,19 @@ function timingRowsForFollower(item: Record<string, unknown>): unknown[][] {
|
||||
return rows;
|
||||
}
|
||||
|
||||
function performanceRowsForFollower(item: Record<string, unknown>): unknown[][] {
|
||||
const performance = asOptionalRecord(item.performance);
|
||||
if (performance === null) return [];
|
||||
return arrayRecords(performance.slowStages).map((stage) => [
|
||||
item.id,
|
||||
stage.stage ?? "-",
|
||||
stage.status ?? "-",
|
||||
formatSeconds(numberOrNull(stage.seconds)),
|
||||
stringOrNull(stage.source) ?? "-",
|
||||
stringOrNull(stage.object) ?? "-",
|
||||
]);
|
||||
}
|
||||
|
||||
function reconcileRowsFromRunOnce(payload: Record<string, unknown>, followers: Record<string, unknown>[]): unknown[][] {
|
||||
const timeline = asOptionalRecord(payload.reconcileTimeline);
|
||||
if (timeline !== null) return reconcileRowsForTimeline(timeline, null);
|
||||
|
||||
Reference in New Issue
Block a user