golang-benchmark

Solid

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 golang-performance provides the optimization patterns.

Testing & QA 0 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
0
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

**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:** Use `ultrathink` for benchmark analysis, profile interpretation, and performance comparison tasks. Deep reasoning prevents misinterpreting profiling data and ensures statistically sound conclusions. # 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 ### `b.Loop()` (Go 1.24+) — preferred `b.Loop()` prevents the compiler from optimizing away the code under test — without it, the compiler can detect dead results and eliminate them, producing misleadingly fast numbers. It also excludes setup code before the loop from timing automatically. ```go func BenchmarkParse(b *testing.B) { data := loadFixture("large.json") // setup — excluded from timing for b.Loop() { Parse(data) // compiler cannot eliminate this call } } ``` Existing `for rang...

Details

Author
guynhsichngeodiec
Repository
guynhsichngeodiec/cc-skills-golang
Created
3 months ago
Last Updated
yesterday
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

go-benchmark

Go performance benchmarking and pprof profiling specialist. ALWAYS use when writing benchmark functions (testing.B), generating or reading pprof profiles, interpreting flame graphs, finding memory allocation hotspots, comparing implementations with benchstat, or measuring ns/op / B/op / allocs/op. In Go code contexts, also trigger when the user says "it's slow", "too many allocations", "find the bottleneck", or "profile this Go code".

27 Updated yesterday
johnqtcg
AI & Automation Solid

golang-performance

Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (see golang-benchmark skill) or debugging workflow (see golang-troubleshooting skill).

0 Updated yesterday
guynhsichngeodiec
AI & Automation Solid

performance-profiler

Systematically finds and fixes performance bottlenecks by measuring first, profiling hot paths, reducing algorithmic and I/O cost, and verifying gains with before/after benchmarks. Use this skill when code, an endpoint, a page, a query, or a job is "slow", "laggy", "timing out", "using too much CPU/memory", or "doesn't scale"; when asked to optimize, speed up, profile, or benchmark something; when chasing high latency / low throughput, p99 spikes, memory leaks, N+1 queries, or excessive allocations; or before/after a perf-sensitive change to prove it actually helped. Covers Python, Node/JS, Go, Java, SQL, and HTTP/web frontends.

3 Updated today
JayRHa