Type Alias DiagnosticEvent
DiagnosticEvent:
| {
type: "spawn";
binary: string;
args: string[];
pid: number
| undefined;
}
| { type: "start"; binary: string; args: string[] }
| {
type: "progress";
percent: number | undefined;
fps: number;
speed: number;
outTimeUs: number;
}
| { type: "end"; durationMs: number; exitCode: number
| null }
| {
type: "error";
durationMs: number;
code: string | undefined;
message: string;
}
| { type: "retry"; attempt: number; delayMs: number; reason: string }
Structured lifecycle events.
This is the seam for metrics and tracing:
onDiagnosticreceives one event per job transition, so an application can build a histogram of encode durations without parsing log text.