golang-benchmark
Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber/cc-skills-golang@golang-performance` provides the optimization patterns.
Install
With your agent
Install OMGSkills skill "samber/cc-skills-golang:golang-benchmark" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
git clone https://github.com/samber/cc-skills-golang /tmp/cc-skills-golang && ln -s /tmp/cc-skills-golang/skills/golang-benchmark ~/.claude/skills/golang-benchmark
From README
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 on running services, → See samber/cc-skills-golang@golang-troubleshooting skill. Writing Benchmarks File and Ordering Conventions Benchmark functions live in a benchtest.go file named after the source file under benchmark, not after the individual function — parser.go -> parserbenchtest.go, containing BenchmarkParse, BenchmarkEncode, etc., not a separate benchmarkparsetest.go per function. Keeping benchmarks in their own file (instead of mixed into parsertest.go) keeps go test -bench=. ./pkg/parser output free of unrelated Test noise.
More from this repo
golang-cli
Golang CLI application development.
golang-code-style
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments...
golang-concurrency
Golang concurrency design — goroutine lifecycle and leak prevention, channels and `select`, channel ownership and...
