What problem does it solve?
This Skill helps developers measure, diagnose, and improve the performance of Go programs by identifying and resolving CPU, memory, and latency bottlenecks.
Core Features & Use Cases
- Performance Measurement: Set up and run benchmarks using
go test and benchstat.
- Profiling: Collect and analyze CPU, heap, allocation, mutex, and block profiles using
pprof.
- Tracing: Generate and interpret execution traces for concurrency and scheduler issues.
- Optimization Guidance: Provides best practices for code optimization, including algorithmic improvements and memory management.
- Use Case: Diagnose why a critical Go service is experiencing high latency under load by profiling its CPU and memory usage, identifying the hot spots, and applying targeted optimizations.
Quick Start
Use the go-performance skill to benchmark the myFunction in the current directory and analyze the results.