Skip to content

Commit 36ef007

Browse files
committed
PR
1 parent 2e1b4a7 commit 36ef007

8 files changed

Lines changed: 985 additions & 417 deletions

File tree

.github/skills/chat-perf/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ npm run perf:chat-leak -- --messages 20 --verbose
2828

2929
## Perf regression test
3030

31-
**Script:** `scripts/chat-perf/test-chat-perf-regression.js`
31+
**Script:** `scripts/chat-simulation/test-chat-perf-regression.js`
3232
**npm:** `npm run perf:chat`
3333

3434
Launches VS Code via Playwright Electron, opens the chat panel, sends a message with a mock LLM response, and measures timing, layout, and rendering metrics. By default, downloads VS Code 1.115.0 as a baseline, benchmarks it, then benchmarks the local dev build and compares.
@@ -62,10 +62,10 @@ When results exceed the threshold but aren't statistically significant, the tool
6262
npm run perf:chat -- --scenario text-only --runs 3
6363

6464
# Add 3 more runs to the same results file (both test + baseline):
65-
npm run perf:chat -- --resume .chat-perf-data/2026-04-14T02-15-14/results.json --runs 3
65+
npm run perf:chat -- --resume .chat-simulation-data/2026-04-14T02-15-14/results.json --runs 3
6666

6767
# Keep adding until confidence is reached:
68-
npm run perf:chat -- --resume .chat-perf-data/2026-04-14T02-15-14/results.json --runs 5
68+
npm run perf:chat -- --resume .chat-simulation-data/2026-04-14T02-15-14/results.json --runs 5
6969
```
7070

7171
`--resume` loads the previous `results.json` and its associated `baseline-*.json`, runs N more iterations for both builds, merges rawRuns, recomputes stats, and re-runs the comparison. The updated files are written back in-place. You can resume multiple times — samples accumulate.
@@ -112,7 +112,7 @@ Results use **IQR-based outlier removal** and **median** (not mean) to handle st
112112

113113
## Memory leak check
114114

115-
**Script:** `scripts/chat-perf/test-chat-mem-leaks.js`
115+
**Script:** `scripts/chat-simulation/test-chat-mem-leaks.js`
116116
**npm:** `npm run perf:chat-leak`
117117

118118
Launches one VS Code session, sends N messages sequentially, forces GC between each, and measures renderer heap and DOM node count. Uses **linear regression** on the samples to compute per-message growth rate, which is compared against a threshold.
@@ -141,7 +141,7 @@ Launches one VS Code session, sends N messages sequentially, forces GC between e
141141
## Architecture
142142

143143
```
144-
scripts/chat-perf/
144+
scripts/chat-simulation/
145145
├── common/
146146
│ ├── mock-llm-server.js # Mock CAPI server matching @vscode/copilot-api URL structure
147147
│ └── utils.js # Shared: paths, env setup, stats, launch helpers

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ product.overrides.json
2525
*.snap.actual
2626
*.tsbuildinfo
2727
.vscode-test
28-
.chat-perf-data
28+
.chat-simulation-data
2929
vscode-telemetry-docs/
3030
test-output.json
3131
test/componentFixtures/.screenshots/*

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
"extensions-ci": "npm run gulp extensions-ci",
8080
"extensions-ci-pr": "npm run gulp extensions-ci-pr",
8181
"perf": "node scripts/code-perf.js",
82-
"perf:chat": "node scripts/chat-perf/test-chat-perf-regression.js",
83-
"perf:chat-leak": "node scripts/chat-perf/test-chat-mem-leaks.js",
82+
"perf:chat": "node scripts/chat-simulation/test-chat-perf-regression.js",
83+
"perf:chat-leak": "node scripts/chat-simulation/test-chat-mem-leaks.js",
8484
"copilot:setup": "npm --prefix extensions/copilot run setup",
8585
"copilot:get_token": "npm --prefix extensions/copilot run get_token",
8686
"update-build-ts-version": "npm install -D typescript@next && npm install -D @typescript/native-preview && (cd build && npm run typecheck)",

0 commit comments

Comments
 (0)