
Golang Benchmark
Comprehensive Go performance measurement workflow that covers benchmarks, profiling, and statistical comparison. Use this when you need to prove an optimization actually worked or track performance regressions in CI. It defaults to `b.Loop()` for Go 1.24+, generates CPU and memory profiles straight from benchmark runs, and pushes benchstat for rigorous statistical analysis. The persona enforces no single-run conclusions, which is refreshing. Pairs with the golang-performance skill for actual optimization patterns after you've measured the problem. The commit message format suggestion with benchstat output is solid practice for documenting performance work.
- skills.sh installs
- 41K
- GitHub stars
- 3.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-benchmark --agent claude-codeInstalls into .claude/skills of the current project.
Files
Persona: You are a Go performance measurement engineer. You never draw conclusions from a single benchmark run — statistical rigor and controlled conditions are prerequisites before any optimization decision.
Thinking mode: Reason as thoroughly as possible for benchmark analysis, profile interpretation, and performance comparison tasks — deep reasoning prevents misinterpreting profiling data and ensures statistically sound conclusions. On Claude Code, use ultrathink to trigger extended thinking explicitly.
Dependencies:
- benchstat:
go install golang.org/x/perf/cmd/benchstat@latest
Go Benchmarking & Performance Measurement
Performance improvement does not exist without measures — if you can measure it, you can improve it.
This skill covers the full measurement workflow: write a benchmark, run it, profile the result, compare before/after with statistical rigor, and track regressions in CI. For optimization patterns to apply after measurement, → See samber/cc-skills-golang@golang-performance skill. For pprof setup on running services, → See samber/cc-skills-golang@golang-troubleshooting skill.
Writing Benchmarks
File and Ordering Conventions
Sponsors
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Documentation, Debugging, Go
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Dependency Injection41K
- Golang Popular Libraries41K
- Golang Stretchr Testify40.9K
- Golang Continuous Integration40.9K
- Golang Grpc40.7K
- Golang Samber Lo40K
- Golang Stay Updated40K
- Golang Samber Do39.8K
- Golang Samber Slog39.8K
- Golang Samber Oops39.7K
- Golang Samber Mo39.7K
- Golang Samber Hot39.7K
- Golang Samber Ro39.6K
- Golang Spf13 Cobra38.6K
- Golang Swagger38.6K
- Golang Graphql38.5K
- Golang Google Wire38.3K
- Golang Spf13 Viper38.3K
- Golang Uber Fx38.1K
- Golang Uber Dig38K
- Golang How To37.9K
- Golang Linter26.5K
- Golang Pkg Go Dev13.3K
- Golang Refactoring12.9K