- 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 | 164 | function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) { |
| 165 | + const largeThreadRenderStats = Array.isArray(donePayload.interactions?.largeThreadRenderStats) | |
| 166 | + ? donePayload.interactions.largeThreadRenderStats | |
| 167 | + : []; | |
| 165 | 168 | const lines = [ |
| 166 | 169 | marker, |
| 167 | 170 | "## Desktop Dev Perf Trace", |
| @@ -178,6 +181,16 @@ function createMarkdownSummary({ tracePath, donePayload, summary, thresholds }) · 10 unmodified lines | ||
| 178 | 181 | `- Typed chars: ${donePayload.interactions?.typedChars ?? "n/a"}`, |
| 179 | 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 | 194 | "### Input Event Metrics", |
| 182 | 195 | "", |
| 183 | 196 | "| Event | Count | Avg (ms) | Max (ms) | Total (ms) |", |