(input: {
elapsedMs: number;
outputDurationSeconds?: number;
isDirectory: boolean;
frameCount?: number;
})
| 23 | * count instead, or just the render time when neither is known. |
| 24 | */ |
| 25 | export function formatRenderSummaryDetail(input: { |
| 26 | elapsedMs: number; |
| 27 | outputDurationSeconds?: number; |
| 28 | isDirectory: boolean; |
| 29 | frameCount?: number; |
| 30 | }): string { |
| 31 | const middle = input.isDirectory |
| 32 | ? input.frameCount != null |
| 33 | ? `${input.frameCount} frames` |
| 34 | : undefined |
| 35 | : input.outputDurationSeconds != null && input.outputDurationSeconds > 0 |
| 36 | ? `${formatDuration(input.outputDurationSeconds * 1000)} video` |
| 37 | : undefined; |
| 38 | const renderTime = `rendered in ${formatDuration(input.elapsedMs)}`; |
| 39 | return [middle, renderTime].filter(Boolean).join(" · "); |
| 40 | } |
| 41 | |
| 42 | export function label(name: string, value: string): string { |
| 43 | const pad = 14 - name.length; |
no test coverage detected