History

Expose resolved perf thresholds in trace output

Cursor Agent committed 9 months ago

Commit 3eb3e751 parent d1eb8051 file · +9 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/desktop-perf-trace.mjs+9−0
@@ -322,6 +322,12 @@ function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) · 321 unmodified lines
322322 `- Benchmark sweep enabled: ${donePayload.config?.runBenchmarkThreadSweep ?? "n/a"}`,
323323 `- Benchmark follow-up pass count: ${donePayload.config?.benchmarkFollowUpPassCount ?? "n/a"}`,
324324 "",
325+ "### Threshold Config",
326+ "",
327+ `- keypress avg max: ${thresholds.maxKeypressAvgMs}ms`,
328+ `- keypress max max: ${thresholds.maxKeypressMaxMs}ms`,
329+ `- long EventDispatch spike cap: ${thresholds.maxLongDispatchCount}`,
330+ "",
325331 "### Benchmark Thread Render",
326332 "",
327333 "| Thread | Title (15) | Messages | First Nav (ms) | Follow-up Median (ms) | Follow-up Range | Delta (ms) | Delta (%) |",
@@ -684,6 +690,9 @@ async function main() { · 356 unmodified lines
684690 value: process.env.T3CODE_PERF_TIMEOUT_MS,
685691 fallback: 420000,
686692 });
693+ console.log(
694+ `[desktop-perf] thresholds: keypressAvg<=${maxKeypressAvgMs}ms, keypressMax<=${maxKeypressMaxMs}ms, longDispatch<=${maxLongDispatchCount}, timeoutMs=${timeoutMs}`,
695+ );
687696
688697 const child = spawn("bun", ["dev:desktop"], {
689698 cwd: repoRoot,