feat(producer): surface beginframe no-damage reuse counters in perf summary and telemetry

This commit is contained in:
vanceingalls
2026-07-11 19:44:24 +00:00
parent b1f1c0571e
commit dde3afb72e
8 changed files with 102 additions and 0 deletions
+2
View File
@@ -1683,6 +1683,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
@@ -244,6 +244,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
@@ -128,6 +128,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;
@@ -210,6 +214,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,