benchee-profiling
Installation
SKILL.md
Benchee Profiling
RULES — Follow these with no exceptions
- Benchmark in production-like conditions — use
MIX_ENV=prodfor realistic results - Compare alternatives — always benchmark at least 2 approaches to justify optimization; ensure implementations do the same thing
- Document performance regressions — track benchmark results over time in
bench/baseline.jsonwith a >10% threshold - Profile before benchmarking — use
:fprofor:eprofto identify the actual bottleneck before writing benchmarks - Use multiple inputs — test with small, medium, and large inputs to catch size-dependent behavior; use realistic data sizes
- Warm up before measuring — run warmup phase to let JIT compilation settle
- Run sufficiently and repeatedly — use
time: 10(10 seconds) for reliable measurements and run 3-5 times to rule out variance - Separate I/O benchmarks — never benchmark network or disk I/O in the same run as compute benchmarks