performance-profiling

Profile Go microservices with pprof, benchmarks, and load testing.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/microservices-agent-skills --skill performance-profiling-vesviet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-profiling
Source: https://github.com/vesviet/microservices-agent-skills/tree/main/skills/performance-profiling
Command: npx skills add https://github.com/vesviet/microservices-agent-skills --skill performance-profiling-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify and resolve performance bottlenecks in Go microservices, ensuring faster response times, efficient resource utilization, and better scalability.

Core Features & Use Cases

  • pprof Profiling: Analyze CPU, memory, and goroutine usage to pinpoint performance hotspots.
  • Go Benchmarking: Write and run benchmarks to measure the performance of critical code paths.
  • Load Testing: Simulate user traffic using tools like K6 and vegeta to test service under stress.
  • Use Case: When a service experiences slow response times under load, use this Skill to profile its CPU and memory usage, identify inefficient database queries or excessive allocations, and then write benchmarks to confirm improvements after optimization.

Quick Start

Use the performance-profiling skill to capture a 30-second CPU profile for the service running on port 8080.

Frequently Asked Questions about performance-profiling

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

FAQPage Schema
How do I identify the cause of high CPU usage in a Go microservice?

Profile a Go microservice using pprof to capture CPU, memory, and goroutine metrics to pinpoint performance hotspots. This Skill analyzes profiling data to identify inefficient code paths causing CPU spikes and slow response times under load.

What's the best way to benchmark critical code paths in Go?

The best way to benchmark Go code paths is using the go test -bench command. This Skill guides you in writing and running benchmarks to measure performance, ensuring you can verify improvements after optimizing slow functions or excessive allocations.

How do I load test a Go service to find bottlenecks under traffic?

You can load test a Go service by simulating user traffic with tools like K6 or vegeta. This Skill integrates these utilities to stress test your microservice, revealing slow response times and resource utilization issues under heavy load.

Can I use pprof to analyze high memory usage in my Go application?

Yes, you can use pprof to analyze high memory usage in a Go application. This Skill leverages pprof profiling to inspect memory allocation patterns, helping you find and fix excessive allocations that degrade microservice performance.

Do I need specific load testing tools to optimize Go microservice performance?

You need load testing tools like K6 or vegeta to comprehensively optimize Go microservice performance. This Skill requires these utilities alongside Go's built-in pprof and go test -bench to simulate traffic and analyze CPU and memory metrics.