Loading...
Loading...
Expert in system optimization, profiling, and scalability. Specializes in eBPF, Flamegraphs, and kernel-level tuning.
npx skill4agent add 404kidwiz/claude-supercode-skills performance-engineerWhat is the bottleneck?
│
├─ **CPU High?**
│ ├─ User Space? → **Language Profiler** (pprof, async-profiler)
│ └─ Kernel Space? → **perf / eBPF** (System calls, Context switches)
│
├─ **Memory High?**
│ ├─ Leak? → **Heap Dump Analysis** (Eclipse MAT, heaptrack)
│ └─ Fragmentation? → **Allocator tuning** (jemalloc, tcmalloc)
│
├─ **I/O Wait?**
│ ├─ Disk? → **iostat / biotop**
│ └─ Network? → **tcpdump / Wireshark**
│
└─ **Latency (Wait Time)?**
└─ Distributed? → **Tracing** (OpenTelemetry, Jaeger)| Tool | Language | Best For |
|---|---|---|
| K6 | JS | Developer-friendly, CI/CD integration. |
| Gatling | Scala/Java | High concurrency, complex scenarios. |
| Locust | Python | Rapid prototyping, code-based tests. |
| Wrk2 | C | Raw HTTP throughput benchmarking (simple). |
database-optimizer# Record stack traces at 99Hz for 30 seconds
perf record -F 99 -a -g -- sleep 30perf script > out.perf
./stackcollapse-perf.pl out.perf > out.folded
./flamegraph.pl out.folded > profile.svgprofile.svgjson_parseawait new Promise(r => setTimeout(r, 0))scheduler.postTask()clickasync function handleClick() {
// 1. UI Update (Immediate)
setLoading(true);
// 2. Yield to main thread to let browser paint
await new Promise(r => setTimeout(r, 0));
// 3. Heavy Logic
await heavyCalculation();
setLoading(false);
}Web Vitalsmap()for| Function | CPU % | Optimization Action |
|---|---|---|
| json_serialize | 35% | Switch to binary format |
| crypto_hash | 25% | Batch hashing operations |
| regex_match | 20% | Pre-compile patterns |
Service A (50ms) → Service B (200ms) → Service C (500ms) → Database (1s)
↑
Connection pool exhaustion| Virtual Users | RPS | P95 Latency | Error Rate |
|---|---|---|---|
| 1,000 | 500 | 150ms | 0.1% |
| 5,000 | 2,400 | 280ms | 0.3% |
| 10,000 | 4,800 | 550ms | 1.2% |
| 15,000 | 6,200 | 1.2s | 5.8% |