What problem does it solve?
This Skill solves unreliable Go performance decisions by providing a rigorous workflow to measure, profile, compare, and interpret benchmark and profiling results without being misled by noise or dead-code elimination.
Core Features & Use Cases
- Write correct Go benchmarks: use Go 1.24+
b.Loop() to prevent dead-code elimination mistakes, structure setup vs timed code, and report allocations and custom throughput metrics.
- Run and capture measurable benchmark data: standardize benchmark flags (
-benchmem, -count, -benchtime) and generate CPU/memory/trace profiles directly from benchmark runs.
- Interpret results with confidence: use benchstat for A/B comparison, understand confidence intervals and the
~ (not statistically significant) signal, and avoid p-hacking.
- Profile and diagnose bottlenecks: generate pprof CPU/heap/trace outputs from benchmarks, then guide interpretation (flat vs cumulative, GC churn vs leaks, and trace vs pprof selection).
- Integrate regression detection into CI: choose appropriate tooling (benchdiff/ cob/ gobenchdata) for PR gating or long-term performance trend tracking.
Quick Start
Use the golang-benchmark skill to produce a statistically valid Go benchmark and interpret the before/after delta with benchstat for the command you provide.