golang-performance

Profile and benchmark Go applications using pprof, trace, and benchstat.

15|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AeonDave/malskill --skill golang-performance-aeondave
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-performance
Source: https://github.com/AeonDave/malskill/tree/main/programming/golang-performance
Command: npx skills add https://github.com/AeonDave/malskill --skill golang-performance-aeondave

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers identify and resolve performance bottlenecks in Go applications by providing a structured workflow for measurement, analysis, and optimization.

Core Features & Use Cases

  • Performance Measurement: Capture CPU, memory, and contention profiles.
  • Bottleneck Identification: Pinpoint hot paths and allocation hotspots.
  • Targeted Optimization: Guide fixes for allocations, GC pressure, and concurrency issues.
  • Verification: Ensure improvements are validated through repeatable benchmarks.
  • Use Case: A Go service is experiencing high latency under load. This Skill can be used to profile the service, identify the functions consuming the most CPU or causing excessive allocations, and guide the developer on how to refactor the code for better performance.

Quick Start

Use the golang-performance skill to profile the CPU usage of the application for 30 seconds.

Frequently Asked Questions about golang-performance

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

FAQPage Schema
How do I profile CPU usage and memory allocations in a Go application?

Profiling CPU usage and memory allocations in a Go application requires capturing profiles using pprof and trace tools to pinpoint hot paths and allocation hotspots for targeted optimization.

What is the best way to reduce garbage collection pressure in Golang?

Reducing garbage collection pressure in Golang involves profiling memory allocations to identify hotspots and refactoring code to minimize unnecessary heap allocations during execution.

How do I benchmark Go code to verify performance improvements?

Benchmarking Go code to verify performance improvements requires running repeatable measurements using benchstat to ensure that code refactoring effectively reduces latency and resource utilization.

Why does my Go service experience high latency under load and how can I fix it?

High latency in a Go service under load often stems from concurrency contention or CPU bottlenecks, which you can identify through systematic profiling and resolve via targeted code refactoring.

Can I use pprof to identify concurrency contention in Golang?

Yes, you can use pprof to capture contention profiles in Golang, allowing you to identify concurrency bottlenecks and guide fixes to resolve lock contention issues.

What are the limitations of profiling Go applications under production workloads?

Profiling Go applications under production workloads requires careful measurement using pprof and trace to avoid overhead, but extended profiling durations may impact live service latency.