diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e57e74b45e..cfa48d0ad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,9 @@ jobs: T3CODE_DESKTOP_PERF_RUN_TERMINAL: "0" # Keep only core renderer interactions in CI perf runs for lower variance. T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: "0" + # Skip benchmark sweep loops in CI to reduce EventDispatch variance. T3CODE_DESKTOP_PERF_RUN_BENCHMARK_SWEEP: "0" + # Keep benchmark follow-up passes disabled in CI by default. T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES: "0" T3CODE_ELECTRON_STARTUP_TIMEOUT_MS: "180000" run: xvfb-run -a bun run test:desktop-perf diff --git a/apps/desktop/src/perfConfig.test.ts b/apps/desktop/src/perfConfig.test.ts index a711373f0f..0de69a9155 100644 --- a/apps/desktop/src/perfConfig.test.ts +++ b/apps/desktop/src/perfConfig.test.ts @@ -204,6 +204,7 @@ describe("shouldRunOptionalRendererPerfInteractions", () => { it("defaults to enabled outside CI and disabled in CI", () => { expect(shouldRunOptionalRendererPerfInteractions({ CI: "false" })).toBe(true); expect(shouldRunOptionalRendererPerfInteractions({ CI: "true" })).toBe(false); + expect(shouldRunOptionalRendererPerfInteractions({ CI: "ON" })).toBe(false); }); it("supports explicit env overrides", () => { @@ -219,6 +220,12 @@ describe("shouldRunOptionalRendererPerfInteractions", () => { CI: "false", }), ).toBe(false); + expect( + shouldRunOptionalRendererPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: " FALSE ", + CI: "false", + }), + ).toBe(false); }); it("falls back to CI default for unknown values", () => { @@ -234,6 +241,12 @@ describe("shouldRunOptionalRendererPerfInteractions", () => { CI: "false", }), ).toBe(true); + expect( + shouldRunOptionalRendererPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: " ", + CI: "true", + }), + ).toBe(false); }); });