
Golang Benchmark
Go benchmarking workflow covering writing, running, profiling, and statistically comparing benchmarks with pprof and benchstat.
- skills.sh installs
- 41.5K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers the full measurement loop: writing
b.Loop()benchmarks, running them with-benchmemand-count, profiling, and comparing results with benchstat - Includes guidance on
_bench_test.gofile layout, sub-benchmarks, custom metrics viab.ReportMetric(), and a table of commongo testprofiling flags - Enforces serial benchmark runs so concurrent CPU contention does not corrupt
ns/opresults, even when optimization variants are built in parallel worktrees - Designed for Go developers who need statistically sound before/after comparisons, and it hands optimization patterns off to a separate performance skill
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-benchmark -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Testing & QA
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Dependency Injection41.4K
- Golang Popular Libraries41.4K
- Golang Stretchr Testify41.3K
- Golang Continuous Integration41.3K
- Golang Grpc41.1K
- Golang Samber Lo40.4K
- Golang Stay Updated40.3K
- Golang Samber Do40.2K
- Golang Samber Slog40.1K
- Golang Samber Oops40K
- Golang Samber Mo40K
- Golang Samber Hot40K
- Golang Samber Ro39.9K
- Golang Spf13 Cobra39K
- Golang Swagger39K
- Golang Graphql38.8K
- Golang Google Wire38.7K
- Golang Spf13 Viper38.7K
- Golang Uber Fx38.4K
- Golang Uber Dig38.4K
- Golang How To38.3K
- Golang Linter26.5K
- Golang Pkg Go Dev13.7K
- Golang Refactoring13.3K
Similar to Golang Benchmark
More Go
golang-performanceSkillsamber/cc-skills-golang44.1K installsGo performance patterns for allocation reduction, CPU efficiency, GC tuning, pooling, and caching, applied per bottleneck.
go-performanceSkillcxuu/golang-skills1.3K installsPerformance patterns for Go hot paths, covering conversions, allocation, string building, and benchmarking.
golang-troubleshootingSkillsamber/cc-skills-golang42K installsSystematic Go debugging methodology with pprof, Delve, race detection, and GODEBUG tracing for root-cause fixes.
golang-proSkillsickn33/agentic-awesome-skills455 installsExpert Go 1.21+ guidance for concurrency, performance tuning, and production-ready microservices with testing and profiling.
python-performance-optimizationSkillsickn33/agentic-awesome-skills362 installsProfiling and memory tooling guide for finding and fixing Python performance bottlenecks with measurable, repeatable benchmarks.
performance-optimizerPlugindavila7/claude-code-templates24.2K starsPerformance optimization suite with profiling, bundle analysis, and speed improvement tools