<< All versions
Skill v1.0.0
currentLLM-judged scan90/100lyther/agent-surface/qa-measure
──Details
PublishedOctober 21, 2026 at 09:24 AM
Content Hashsha256:8d92520f20433d4f...
Git SHA146d8e87a3c8
──Files
Files (1 file, 2.9 KB)
SKILL.md2.9 KBactive
SKILL.md · 86 lines · 2.9 KB
version: "1.0.0" name: qa-measure description: "Collect hard performance and resource measurements."
OBJECTIVE
THE QUANTIFIED REALITY. You cannot improve what you cannot measure. Your Goal: Extract hard numbers (Latency, Throughput, CPU/Mem) from the system. Boundary: Stop at the data. Do not fix the code yet.
PROTOCOL
Phase 1: Budgets & SLIs/SLOs
- Define SLIs: P50/P95/P99 latency, error rate, throughput, memory/CPU
- Set SLOs: e.g., P95 < 300ms for
/api/orders, error rate < 0.1% - Scope: Critical paths only (auth, checkout, search)
- Perf Budgets: Per endpoint/function; include payload sizes
Phase 2: Baseline Measurement
- Local/CI Determinism:
- Pin CPU governor; disable turbo if possible
- Fix input datasets and RNG seeds; isolate noisy neighbors (containers)
- Profilers:
- Node/TS:
clinic flame,0x, built-in profiler - Python:
py-spy,scalene - Rust/Go:
pprof,perf
- DB Explainability:
- Use
EXPLAIN (ANALYZE, BUFFERS); forbid seq scans on hot paths - Verify indexes on filter/join keys; add statement timeouts
Phase 3: Load & Stress
- Load Tools:
k6,wrk,vegeta, Locust
- Scenarios:
- Steady-state (baseline), spike (burst), soak (hours)
- Data Fidelity:
- Anonymized, realistic distributions (payload sizes, cache miss ratios)
- Thresholds:
- Gate on P95/P99 and error rate; k6 thresholds in CI
Phase 4: Optimization Loop
- Identify Hotspots: Flamegraphs, top-down call stacks
- Hypothesis -> Change -> Measure: One change at a time
- Cache & Concurrency:
- Add bounded caches with eviction and TTLs
- Apply backpressure; timeouts with jittered retries; circuit breakers
- Memory & GC:
- Track allocations; avoid large object churn; pool where sensible
Phase 5: Database & I/O Hygiene
- N+1: Replace with prefetch/batch queries
- Connection Pooling: Size per CPU and DB limits; avoid thundering herds
- Prepared Statements: Reuse plans for hot queries
- Pagination & Streaming: Avoid loading entire datasets; stream/chunk
OUTPUT FORMAT
1. Perf Report
markdown
> Route: `POST /checkout`> Baseline: P50 120ms, P95 480ms (CPU 65%)> After: P50 90ms, P95 220ms (CPU 52%)> Change: Added read-through cache for product lookup (TTL 60s, size 10k)
2. Artifact
Attach flamegraph SVG and load test script (scripts/load/checkout.js).
EXECUTION RULES
- REPEATABILITY: Same input -> same result envelope. If variance > 10%, fix environment
- NO CHEATING: Do not remove work that users rely on just to meet budgets
- REGRESSION GUARD: Add perf check to CI with threshold ratchet (P95/P99 + error rate)
- OBSERVABILITY: Emit metrics/traces; tag by scenario and version; link to commits
- DATA SAFETY: Use synthetic or anonymized data; never prod dumps in CI