openclaw-test-performance
Benchmark, diagnose, and optimize OpenClaw test runtime, import hotspots, CPU/RSS, and slow coverage paths.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Benchmark, diagnose, and optimize OpenClaw test runtime, import hotspots, CPU/RSS, and slow coverage paths.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | openclaw-test-performance |
| description | Benchmark, diagnose, and optimize OpenClaw test runtime, import hotspots, CPU/RSS, and slow coverage paths. |
Use evidence first. The goal is real pnpm test speed/RSS improvement with
coverage intact, not runner tuning by guesswork.
AGENTS.md files before editing:
src/agents/AGENTS.md for agent/import hotspots.src/channels/AGENTS.md and src/plugins/AGENTS.md for plugin/channel
laziness.src/gateway/AGENTS.md for server lifecycle tests.test/helpers/AGENTS.md and test/helpers/channels/AGENTS.md for shared
contract helpers.src/infra/outbound/AGENTS.md for outbound/media/action tests.pnpm test:perf:groups --full-suite --allow-failures --output <file>
for full-suite ranking./usr/bin/time -l pnpm test <file-or-files> --maxWorkers=1 --reporter=verboseOPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1.scripts/committer "<message>" <paths...> and push when the
user asked for commits/pushes. Stage only files touched for this attack.getChannelPlugin() fallback used when an already-loaded fixture or pure
parser would suffice.api.ts, runtime-api.ts, test-api.ts, or plugin-sdk barrels pulled
into hot tests.importActual() around broad modules.vi.resetModules() plus fresh imports in per-test loops.beforeAll while runtime state resets in
afterEach.Scoped file:
timeout 240 /usr/bin/time -l pnpm test <file> --maxWorkers=1 --reporter=verbose
Scoped file with import breakdown:
timeout 240 /usr/bin/time -l env \
OPENCLAW_VITEST_IMPORT_DURATIONS=1 \
OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 \
pnpm test <file> --maxWorkers=1 --reporter=verbose
Grouped suite:
pnpm test:perf:groups --full-suite --allow-failures \
--output .artifacts/test-perf/<name>.json
Reuse an existing Vitest JSON report:
pnpm test:perf:groups --report <vitest-json> \
--output .artifacts/test-perf/<name>.json
pnpm check before commit unless the change is docs-only and the hook
handles it.pnpm build when touching lazy-loading, bundled artifacts, package
boundaries, dynamic imports, build output, or public surfaces.pnpm install and retry the exact failed
command once.| Metric | Before | After | Gain |
| -------------- | -----: | ----: | ------------: |
| File wall time | `Xs` | `Ys` | `-Zs` (`P%`) |
| Max RSS | `XMB` | `YMB` | `-ZMB` (`P%`) |
Keep the final concise:
Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.
Inspect, patch, validate, publish, or confirm OpenClaw GHSA security advisories and private-fork state.
Run, rerun, debug, or interpret OpenClaw Parallels install, onboarding, gateway smoke, and upgrade checks.
Review, triage, close, label, comment on, or land OpenClaw PRs/issues with maintainer evidence checks.
Run, watch, debug, extend, or explain OpenClaw qa-lab and qa-channel scenarios, artifacts, and live lanes.
Prepare or verify OpenClaw stable/beta releases, changelogs, release notes, publish commands, and artifacts.