( job: RenderJob, elapsedMs: number, options: RenderOptions, docker: boolean, )
| 1608 | // chain across 30+ telemetry fields. Not touched by this PR. |
| 1609 | // fallow-ignore-next-line complexity |
| 1610 | function trackRenderMetrics( |
| 1611 | job: RenderJob, |
| 1612 | elapsedMs: number, |
| 1613 | options: RenderOptions, |
| 1614 | docker: boolean, |
| 1615 | ): void { |
| 1616 | const perf = job.perfSummary; |
| 1617 | const compositionDurationMs = perf |
| 1618 | ? Math.round(perf.compositionDurationSeconds * 1000) |
| 1619 | : undefined; |
| 1620 | const speedRatio = |
| 1621 | compositionDurationMs && compositionDurationMs > 0 && elapsedMs > 0 |
| 1622 | ? Math.round((compositionDurationMs / elapsedMs) * 100) / 100 |
| 1623 | : undefined; |
| 1624 | |
| 1625 | const stages = perf?.stages ?? {}; |
| 1626 | const extract = perf?.videoExtractBreakdown; |
| 1627 | |
| 1628 | trackRenderComplete({ |
| 1629 | durationMs: elapsedMs, |
| 1630 | fps: fpsToNumber(options.fps), |
| 1631 | quality: options.quality, |
| 1632 | workers: options.workers ?? perf?.workers, |
| 1633 | docker, |
| 1634 | gpu: options.gpu, |
| 1635 | authoringSkill: options.authoringSkill, |
| 1636 | staticDedupEnabled: perf?.staticDedup?.enabled, |
| 1637 | staticDedupArmed: perf?.staticDedup?.armed, |
| 1638 | staticDedupSkipReason: perf?.staticDedup?.skipReason, |
| 1639 | staticDedupPredictedFrames: perf?.staticDedup?.predictedFrames, |
| 1640 | staticDedupReusedFrames: perf?.staticDedup?.reusedFrames, |
| 1641 | compositionDurationMs, |
| 1642 | compositionWidth: perf?.resolution.width, |
| 1643 | compositionHeight: perf?.resolution.height, |
| 1644 | totalFrames: perf?.totalFrames, |
| 1645 | speedRatio, |
| 1646 | captureAvgMs: perf?.captureAvgMs, |
| 1647 | capturePeakMs: perf?.capturePeakMs, |
| 1648 | tmpPeakBytes: perf?.tmpPeakBytes, |
| 1649 | stageCompileMs: stages.compileMs, |
| 1650 | stageVideoExtractMs: stages.videoExtractMs, |
| 1651 | stageAudioProcessMs: stages.audioProcessMs, |
| 1652 | stageCaptureMs: stages.captureMs, |
| 1653 | stageCaptureSetupMs: stages.captureSetupMs, |
| 1654 | stageCaptureFrameMs: stages.captureFrameMs, |
| 1655 | stageEncodeMs: stages.encodeMs, |
| 1656 | stageAssembleMs: stages.assembleMs, |
| 1657 | extractResolveMs: extract?.resolveMs, |
| 1658 | extractHdrProbeMs: extract?.hdrProbeMs, |
| 1659 | extractHdrPreflightMs: extract?.hdrPreflightMs, |
| 1660 | extractHdrPreflightCount: extract?.hdrPreflightCount, |
| 1661 | extractVfrProbeMs: extract?.vfrProbeMs, |
| 1662 | extractVfrPreflightMs: extract?.vfrPreflightMs, |
| 1663 | extractVfrPreflightCount: extract?.vfrPreflightCount, |
| 1664 | extractPhase3Ms: extract?.extractMs, |
| 1665 | extractCacheHits: extract?.cacheHits, |
| 1666 | extractCacheMisses: extract?.cacheMisses, |
| 1667 | ...renderJobObservabilityTelemetryPayload(job), |
no test coverage detected