golang-benchmark

Benchmark, profile, and detect regressions in Go projects.

5|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/omarluq/og-template --skill golang-benchmark-omarluq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-benchmark
Source: https://github.com/omarluq/og-template/tree/main/.agents/skills/golang-benchmark
Command: npx skills add https://github.com/omarluq/og-template --skill golang-benchmark-omarluq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Golang benchmarking and profiling can be tedious and error-prone without a repeatable workflow. This skill provides a structured approach to measure performance, profile hot paths, compare results, and detect regressions across Go projects.

Core Features & Use Cases

  • Benchmarking workflow: write, run, and compare Go benchmarks with statistical rigor.
  • Profiling guidance: interpret CPU, memory, and trace profiles (pprof) to identify hotspots.
  • CI regression detection: integrate with benchstat/benchdiff for PR-to-base comparisons and trend tracking.

Quick Start

Benchmark your code with a baseline run and compare results; use benchstat to determine significance and guide optimizations.

Frequently Asked Questions about golang-benchmark

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify performance bottlenecks in my Go project?

To identify performance bottlenecks in Go, you need a structured benchmarking and profiling workflow. This involves running benchmarks, capturing CPU and memory profiles with pprof, and analyzing hot paths to pinpoint optimization targets.

How do I use benchstat and benchdiff to detect Go benchmark regressions?

Use benchstat and benchdiff to detect Go benchmark regressions by comparing PR runs against a baseline. This statistical validation determines if performance changes are significant and enforces CI regression gates on pull requests.

What is the best way to interpret pprof CPU and memory profiles in Golang?

The best way to interpret pprof CPU and memory profiles in Golang is through a structured profiling workflow. This guides you through capturing trace data and analyzing hot paths to identify exactly where optimization efforts should focus.

How to set up CI regression gates for Go benchmarks?

Set up CI regression gates for Go benchmarks by integrating benchmark comparisons into your pipeline. Using benchstat and benchdiff, compare PR performance against the base branch to block changes that cause significant regressions.

How to ensure reproducible Go benchmarking workflows?

Ensure reproducible Go benchmarking workflows by using interleaved runs and statistical validation. This structured approach eliminates noise and provides reliable measurement and analysis for production-grade performance work.