profiling

Identify performance bottlenecks in production systems using profiling tools.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill profiling-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: profiling
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/performance/profiling
Command: npx skills add https://github.com/hung-phan/system-skills --skill profiling-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires perf, async-profiler, py-spy, rbspy, net/http/pprof, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive toolkit to identify and analyze performance bottlenecks in production systems, enabling quick resolution of issues like slow response times, high CPU usage, and memory leaks.

Core Features & Use Cases

  • Profiling Tools Overview: Offers an in-depth guide to various profiling tools for different programming languages and platforms.
  • Sampling vs Instrumentation: Explains the differences between sampling and instrumentation methods and when to use each.
  • Flame Graphs: Introduces flame graphs as a visualization tool for understanding where time is spent in a program.
  • Use Case: When you encounter a sudden spike in response times or CPU usage, this Skill can help you identify the specific functions or code paths that are causing the issue.

Quick Start

Use the profiling skill to analyze CPU usage of the current process and generate a flame graph.

Frequently Asked Questions about 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 production application?

To identify high CPU usage, you can use performance profiling tools to sample the running process and generate a flame graph. This visualizes exactly where CPU time is spent, helping pinpoint the specific functions or code paths causing the spike.

What is the difference between sampling and instrumentation for performance profiling?

Sampling periodically collects data on a program's state with low overhead, while instrumentation inserts code to measure exact execution times. Sampling is generally preferred for production environments to minimize impact, whereas instrumentation offers higher detail for specific functions.

Can I use async-profiler to troubleshoot memory leaks in production systems?

Yes, async-profiler can be used to troubleshoot memory leaks in production systems by profiling memory allocation. It helps identify which objects are consuming the most memory and where they are being created in the code.

How do I generate a flame graph to visualize slow response times?

You can generate a flame graph by running a profiling tool like perf or py-spy against your application to collect stack traces. The profiling skill processes these traces to create a visual representation of time spent across code paths.

Does the profiling skill support Ruby and Python applications?

Yes, the profiling skill supports Ruby and Python applications through dedicated tools like rbspy and py-spy. These tools allow you to sample running processes and identify performance bottlenecks without requiring application modifications.