运行聊天性能基准与内存泄漏检查,定位聊天界面回归和性能问题。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "chat-perf" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/chat-perf/SKILL.md 2. 保存为 ~/.claude/skills/chat-perf/SKILL.md 3. 装好后重载技能,告诉我可以用了
对我当前本地开发版运行 chat perf 基准测试,重点比较聊天渲染时间、首屏响应和滚动性能,并总结是否有明显回归。
一份性能测试结果摘要,包含关键指标对比、潜在回归点和简要结论。
对比两个已发布的 VS Code 版本的 chat perf 表现,列出主要性能差异,并指出哪个版本在聊天 UI 上更稳定。
版本间性能对比报告,包含指标差异、稳定性判断和可能原因。
针对聊天响应处理流程运行内存泄漏检查,说明是否存在可疑泄漏对象、增长趋势以及建议的排查方向。
一份内存检查结果,指出疑似泄漏位置、趋势说明和后续排查建议。
chatListRenderer.ts, chatInputPart.ts, markdown rendering)# Run perf regression test (compares local dev build vs VS Code 1.115.0):
npm run perf:chat -- --scenario text-only --runs 3
# Run all scenarios with no baseline (just measure):
npm run perf:chat -- --no-baseline --runs 3
# Compare two local builds (apples-to-apples):
npm run perf:chat -- --build /path/to/build-A --baseline-build /path/to/build-B --runs 5
# Build a local production package and compare against a release:
npm run perf:chat -- --production-build --baseline-build 1.115.0 --runs 5
# Run memory leak check (10 messages in one session):
npm run perf:chat-leak
# Run leak check with more messages for accuracy:
npm run perf:chat-leak -- --messages 20 --verbose
Script: scripts/chat-simulation/test-chat-perf-regression.js
npm: npm run perf:chat
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.
| Flag | Default | Description |
|---|---|---|
--runs <n> | 5 | Runs per scenario. More = more stable. Use 5+ for CI. |
--scenario <id> / -s | all | Scenario to test (repeatable). See common/perf-scenarios.js. |
--build <path|ver> / -b | local dev | Build to test. Accepts path or version (1.110.0, insiders, commit hash). |
--baseline <path> | — | Compare against a previously saved baseline JSON file. |
--baseline-build <path|ver> | 1.115.0 | Version or local path to benchmark as baseline. |
--no-baseline | — | Skip baseline comparison entirely. |
--save-baseline | — | Save results as the new baseline (requires --baseline <path>). |
--resume <path> | — | Resume a previous run, adding more iterations to increase confidence. |
--threshold <frac> | 0.2 | Regression threshold (0.2 = flag if 20% slower). |
--production-build | — | Build a local bundled package via gulp vscode for comparison against a release baseline. |
--no-cache | — | Ignore cached baseline data, always run fresh. |
--force | — | Skip build mode mismatch confirmation prompt. |
--ci | — | CI mode: write Markdown summary to ci-summary.md (implies --no-cache, --heap-snapshots, --cleanup-diagnostics). |
--heap-snapshots | — | Take heap snapshots after each run (slow; auto-enabled in --ci mode). |
--cleanup-diagnostics | — | Delete heap snapshots, CPU profiles, and traces to save disk. During runs, only the latest run's files are kept; after comparison, files for non-regressed scenarios are deleted. Auto-enabled in --ci mode. |
--setting <k=v> | — | Set a VS Code setting override for all builds (repeatable). |
--test-setting <k=v> | — | Set a VS Code setting override for the test build only. |
--baseline-setting <k=v> | — | Set a VS Code setting override for the baseline build only. |
--verbose | — | Print per-run details including response content. |
# Compare 1.110.0 against 1.115.0 (no local build needed):
npm run perf:chat -- --build 1.110.0 --baseline-build 1.115.0 --runs 5
Both --build and --baseline-build accept local paths to VS Code executables. This enables apples-to-apples comparisons between any two builds:
# Compare two dev builds (e.g. feature branch vs main):
npm run perf:chat -- \
--build .build/electron/Code\ -\ OSS.app/Contents/MacOS/Code\ -\ OSS \
…
帮助开发者创建和维护组件截图测试夹具,并优化组件的可测试性。
帮助开发者新增、修改或审查 VS Code 配置策略,并生成平台相关产物。
帮助开发者验证 Azure DevOps 流水线改动,快速排查构建与 YAML 配置问题。
在隔离环境启动 VS Code OSS,便于联动自动化操作与多进程调试。
帮助开发者定位并读取 Code OSS 开发构建日志,快速排查运行与扩展问题。
帮助开发者排查 VS Code 遥测中的未处理错误并定位根因。
自动驱动 VS Code 性能与内存排查,生成可复现分析结果与对比证据。
自动启动并操控 VS Code Insiders 与 Copilot Chat,完成界面测试、聊天交互和截图。
为 AI 编码助手生成或更新聊天定制配置文件,统一协作与开发体验
为 AI 编码助手提供可审查的项目记忆持久化,减少上下文令牌消耗。
帮助你检索并总结聊天消息,快速提炼重点与行动项。
通过桌面聊天界面连接并调用其他大模型,统一管理多模型对话与协作。