- Seed each perf project with a large synthetic thread for stress coverage - Measure thread-switch render latency/message counts via ChatView data attributes - Include a Large Thread Render table in `desktop-perf-trace` markdown output
Showing the changes to scripts (1 of 3 files). Show all
Unified · Split
| @@ -162,6 +162,9 @@ function summarizeTrace(tracePath) { · 161 unmodified lines | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) { | 164 | function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) { |
| 165 | const largeThreadRenderStats = Array.isArray(donePayload.interactions?.largeThreadRenderStats) | ||
| 166 | ? donePayload.interactions.largeThreadRenderStats | ||
| 167 | : []; | ||
| 165 | const lines = [ | 168 | const lines = [ |
| 166 | marker, | 169 | marker, |
| 167 | "## Desktop Dev Perf Trace", | 170 | "## Desktop Dev Perf Trace", |
| @@ -178,6 +181,16 @@ function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) · 10 unmodified lines | |||
| 178 | `- Typed chars: ${donePayload.interactions?.typedChars ?? "n/a"}`, | 181 | `- Typed chars: ${donePayload.interactions?.typedChars ?? "n/a"}`, |
| 179 | `- Model selected: ${donePayload.interactions?.selectedModel ?? "n/a"}`, | 182 | `- Model selected: ${donePayload.interactions?.selectedModel ?? "n/a"}`, |
| 180 | "", | 183 | "", |
| 184 | "### Large Thread Render", | ||
| 185 | "", | ||
| 186 | "| Thread | Messages | Render (ms) |", | ||
| 187 | "| --- | ---: | ---: |", | ||
| 188 | ...(largeThreadRenderStats.length > 0 | ||
| 189 | ? largeThreadRenderStats.map( | ||
| 190 | (stat) => `| ${stat.threadId} | ${stat.messageCount} | ${stat.renderMs} |`, | ||
| 191 | ) | ||
| 192 | : ["| n/a | n/a | n/a |"]), | ||
| 193 | "", | ||
| 181 | "### Input Event Metrics", | 194 | "### Input Event Metrics", |
| 182 | "", | 195 | "", |
| 183 | "| Event | Count | Avg (ms) | Max (ms) | Total (ms) |", | 196 | "| Event | Count | Avg (ms) | Max (ms) | Total (ms) |", |