openclaw-test-performance

Benchmarks and optimizes OpenClaw test and plugin-suite runtime, memory, and import hotspots.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill openclaw-test-performance-amirulandalib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openclaw-test-performance
Source: https://github.com/AmirulAndalib/Vilvona-AI/tree/main/.agents/skills/openclaw-test-performance
Command: npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill openclaw-test-performance-amirulandalib

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow test suites, plugin-suite runs, and unexplained memory growth waste developer time and hide real regressions. This Skill provides an evidence-first workflow to benchmark OpenClaw tests, diagnose import and runtime hotspots, and fix root causes without losing coverage. ## Core Features & Use Cases - Baseline Benchmarking: Collect wall time, Vitest duration, import breakdown, CPU, and max RSS metrics before and after changes using commands like pnpm test:perf:groups and /usr/bin/time -l. - Plugin-Suite Diagnosis: Scope plugin-inspector, extension-batch, and package-boundary test runs to isolate SDK barrel and plugin runtime costs. - Memory Escalation: Classify RSS growth as a real leak, retained module graph, or inconclusive using heap snapshots and the openclaw-test-heap-leaks workflow. - Use Case: A developer notices the full test suite takes 20 minutes. They use this Skill to rank files by cost, find one test loading the entire plugin runtime for static metadata, refactor it to a lightweight helper, and verify a measurable wall-time and RSS improvement. ## Quick Start Ask the assistant to benchmark the slowest OpenClaw test files, identify the top import or memory hotspot, and propose a fix with before-and-after metrics.

Frequently Asked Questions about openclaw-test-performance

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

FAQPage Schema
How do I find the slowest tests in a Vitest suite?

Run a grouped full-suite benchmark such as pnpm test:perf:groups --full-suite --allow-failures to rank files by cost. For a single suspect file, use /usr/bin/time -l pnpm test <file> --maxWorkers=1 --reporter=verbose to capture wall time and max RSS.

How to diagnose slow imports in Vitest tests?

Enable import timing with OPENCLAW_VITEST_IMPORT_DURATIONS=1 and OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 when running the test file. This reveals broad barrels or runtime modules pulled into hot tests so you can replace them with narrow helpers.

Why does RSS keep growing during long test runs?

RSS growth can come from real leaks, retained module graphs, or per-test server startups. Capture heap snapshots with OPENCLAW_TEST_HEAPSNAPSHOT_INTERVAL_MS and only classify it as a leak when snapshots or retainers support that conclusion.

Can I benchmark only specific plugin extension tests?

Yes, run pnpm test:extensions:batch <plugin[,plugin...]> for targeted plugin tests, or pnpm test:extensions:memory with --extension flags for import memory profiles. Widen to pnpm test:extensions only after narrow runs identify the hotspot.

When should I not optimize a slow test?

Avoid removing a slow integration test unless the exact production composition is extracted into a named helper and tested separately. Keep at least one cheap integration smoke test when cross-component wiring matters, and state any incidental coverage removed.