chat-perf

Benchmarks chat rendering performance and detects memory leaks in VS Code builds.

Updated Apr 28, 2026
Ready to run
npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill chat-perf-cokistudios
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: chat-perf
Source: https://github.com/CokiStudios/cokistudios.github.io/tree/main/vscode-src/.github/skills/chat-perf
Command: npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill chat-perf-cokistudios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, @vscode/test-electron, and includes scripts (resource) components.

What problem does it solve? Chat UI changes in VS Code can silently introduce rendering regressions or memory leaks that are hard to catch with unit tests. This Skill automates performance benchmarking and leak detection against local dev builds or published releases, producing statistically validated pass/fail verdicts. ## Core Features & Use Cases - Perf Regression Testing: Launches VS Code via Playwright Electron with a mock LLM server, measures timing, layout, and rendering metrics, and compares against a baseline build using Welch's t-test. - Memory Leak Checks: Sends repeated chat messages with forced GC between each, then uses linear regression on heap and DOM node samples to compute per-message growth rates. - CI Integration & Bisection: Runs daily via the chat-perf.yml workflow with downloadable artifacts, letting you trace when a metric regressed or went flaky across successive main-branch runs. - Use Case: After modifying chatListRenderer.ts, run a scenario comparison of your feature branch build against main with 5 runs to confirm no statistically significant regression before merging. ## Quick Start Ask the AI to run the chat performance regression test comparing the local dev build against VS Code 1.115.0 with the text-only scenario and three runs.

Frequently Asked Questions about chat-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a chat performance regression test in VS Code?▼

Run npm run perf:chat with a scenario and run count, for example npm run perf:chat -- --scenario text-only --runs 3. By default it downloads VS Code 1.115.0 as a baseline, benchmarks both builds, and compares metrics using Welch's t-test.

How do I check for memory leaks in the VS Code chat panel?▼

Run npm run perf:chat-leak to send 10 messages in one session with forced GC between each. It measures heap growth slope and DOM node growth via linear regression, flagging growth above 2 MB per message as a likely leak.

Can I compare two local VS Code builds for performance?▼

Yes, both --build and --baseline-build accept local paths to VS Code executables, enabling apples-to-apples comparisons between any two dev or production builds. Local path baselines are never cached since the build may change between runs.

Why are my chat perf benchmark results flagged as noise?▼

A metric is only flagged as a regression when it exceeds the threshold and is statistically significant at p < 0.05 via Welch's t-test. With typical variance around 20%, you need at least 5 runs to detect a 35% regression and 10 runs for a 20% regression.

When should I not use the --gc-object-stats flag?▼

Never use --gc-object-stats for benchmarking because V8 gc_stats tracing corrupts all timing metrics, with a major GC mid-request adding roughly 550ms. It is intended only for GC deep-dives; prefer heap snapshots for memory analysis.