Merge pull request #2248 from heygen-com/bf-reuse-telemetry

feat(producer): surface beginframe no-damage reuse counters in perf summary and telemetry
This commit is contained in:
Vance Ingalls
2026-07-11 15:31:58 -07:00
committed by GitHub
8 changed files with 110 additions and 0 deletions
+2
View File
@@ -1984,6 +1984,8 @@ function trackRenderMetrics(
staticDedupSkipReason: perf?.staticDedup?.skipReason,
staticDedupPredictedFrames: perf?.staticDedup?.predictedFrames,
staticDedupReusedFrames: perf?.staticDedup?.reusedFrames,
beginFrameNoDamageFrames: perf?.beginFrameReuse?.noDamageFrames,
beginFrameHasDamageFrames: perf?.beginFrameReuse?.hasDamageFrames,
deCaptureMode: perf?.drawElement?.mode,
deCompileGate: perf?.drawElement?.compileGate,
deClampReason: perf?.drawElement?.clampReason,
+21
View File
@@ -310,6 +310,27 @@ describe("render telemetry events", () => {
);
});
it("sends beginframe no-damage reuse counters on render_complete", () => {
trackRenderComplete({
durationMs: 6000,
fps: 30,
quality: "standard",
docker: false,
gpu: false,
beginFrameNoDamageFrames: 720,
beginFrameHasDamageFrames: 480,
});
expect(trackEvent).toHaveBeenCalledWith(
"render_complete",
expect.objectContaining({
begin_frame_no_damage_frames: 720,
begin_frame_has_damage_frames: 480,
}),
undefined,
);
});
it("redacts render_observation messages and includes renderJobId for correlation", () => {
trackRenderObservation({
renderJobId: "render-123",
+6
View File
@@ -147,6 +147,10 @@ export function trackRenderComplete(
staticDedupSkipReason?: string;
staticDedupPredictedFrames?: number;
staticDedupReusedFrames?: number;
// BeginFrame no-damage reuse outcome (Linux/Docker lastFrameCache — the BF
// counterpart of static dedup). Undefined outside beginframe capture mode.
beginFrameNoDamageFrames?: number;
beginFrameHasDamageFrames?: number;
// drawElement fast-capture outcome (default-on release visibility).
// Undefined on render paths with no capture session.
deCaptureMode?: string;
@@ -234,6 +238,8 @@ export function trackRenderComplete(
static_dedup_skip_reason: props.staticDedupSkipReason,
static_dedup_predicted_frames: props.staticDedupPredictedFrames,
static_dedup_reused_frames: props.staticDedupReusedFrames,
begin_frame_no_damage_frames: props.beginFrameNoDamageFrames,
begin_frame_has_damage_frames: props.beginFrameHasDamageFrames,
de_capture_mode: props.deCaptureMode,
de_compile_gate: props.deCompileGate,
de_clamp_reason: props.deClampReason,