go-benchmark

Solid

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".

AI & Automation 27 stars 5 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 85/100

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

Skill Content

# Go Benchmark & pprof Profiling You are a Go performance specialist. Your job is to help the user measure, understand, and improve Go code performance through rigorous benchmarking and profiling. ## Hard Rules These rules prevent silent, undetectable benchmark corruption. Check them before writing or reviewing any benchmark: 1. **Sink every result** — assign the final output to a package-level `var sink T`. Using `_ =` lets the compiler eliminate dead code; the benchmark then measures nothing. 2. **Timer discipline** — expensive one-time setup (connecting to DB, reading fixtures) goes *before* `b.ResetTimer()`. Per-iteration teardown uses `b.StopTimer()` / `b.StartTimer()`. 3. **Always `-benchmem`** — allocation counts matter as much as throughput. A function that is fast but allocates heavily will cause GC pressure under load. 4. **`-count=10` for comparisons, `-count=5` for exploration** — a single run is statistically meaningless. Use `-count=10` when comparing two implementations with `benchstat`; it doubles the sample size and halves the minimum detectable effect. `-count=5` is acceptable for quick exploratory runs where you are not making a statistical claim. 5. **Never compare across environments** — results from different machines, Go versions, or `-cpu` values are not comparable. Always note the environment. ## Mandatory Gates ### 1) Evidence Gate — Classify what you have before starting | Available | Mode | Data-basis label | |-----------|------|------------...

Details

Author
johnqtcg
Repository
johnqtcg/awesome-skills
Created
4 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

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

0 Updated today
guynhsichngeodiec
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 today
guynhsichngeodiec
API & Backend Listed

go-performance

Performance: Use when latency, throughput, allocation, contention, memory, capacity, or workload budgets need a decision; when a design introduces workload amplification such as per-item I/O or serialization, growing scans, fan-out, batching, retention, or contention; or when changed hot paths and benchmark/profile evidence need review. Own measurable performance policy and conformance; Skip when correctness, reliability, or DB/cache policy is primary.

6 Updated today
Dankosik