performance

Profile Go applications with pprof and benchmarks to identify CPU and memory bottlenecks.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/baphled/dotopencode --skill performance-baphled
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/baphled/dotopencode/tree/main/skills/performance
Command: npx skills add https://github.com/baphled/dotopencode --skill performance-baphled

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, leading to faster execution and reduced resource consumption.

Core Features & Use Cases

  • Performance Measurement: Write and run benchmarks to quantify code performance.
  • Bottleneck Identification: Utilize pprof for CPU, memory, and goroutine profiling.
  • Optimization Techniques: Apply strategies for reducing allocations and improving concurrency.
  • Use Case: Your Go API is experiencing high latency under load. Use this Skill to profile the critical endpoints, identify the memory allocations causing garbage collection pressure, and refactor the code for better efficiency.

Quick Start

Use the performance skill to profile the CPU usage of the benchmarked function in the provided Go code.

Frequently Asked Questions about performance

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

FAQPage Schema
How do I profile Go application CPU usage to find bottlenecks?

You can profile Go application CPU usage by utilizing pprof to identify execution bottlenecks. This Skill implements data-driven profiling techniques to pinpoint exact lines of code causing high CPU load, allowing you to target and resolve performance issues directly.

What is the best way to reduce memory allocations in Go APIs?

To reduce memory allocations in Go APIs, you can apply optimization strategies like using sync.Pool to reuse objects. This minimizes garbage collection pressure under high load, leading to faster execution and significantly reduced resource consumption.

How do I write benchmarks in Go to measure code performance?

You can write and run benchmarks using the `go test -bench` command to quantify Go code performance. This Skill helps you implement these data-driven benchmarking techniques to accurately measure execution time before and after applying optimization strategies.

Why does my Go API experience high latency under load?

High latency in Go APIs often stems from memory allocations causing garbage collection pressure or concurrency contention. By profiling critical endpoints with pprof, you can identify these specific resource bottlenecks and refactor the code for better efficiency.

Can I use pprof to identify goroutine concurrency contention?

Yes, pprof can be used to identify goroutine concurrency contention in Go applications. This Skill utilizes pprof for comprehensive CPU, memory, and goroutine profiling to locate exactly where concurrent processes are blocking execution.