Performance Profiling

Diagnose CPU, memory, network, and database bottlenecks through systematic profiling workflows.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/AlexAgent --skill performance-profiling-fabioc-aloha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Performance Profiling
Source: https://github.com/fabioc-aloha/AlexAgent/tree/main/plugin/skills/performance-profiling
Command: npx skills add https://github.com/fabioc-aloha/AlexAgent --skill performance-profiling-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applications slow down for unclear reasons, and guessing at optimizations wastes effort on the wrong code. This Skill provides a systematic observe-identify-hypothesize-optimize-monitor workflow to find real bottlenecks before changing anything. ## Core Features & Use Cases - Multi-layer bottleneck analysis: Classify issues as CPU-bound, memory-bound, I/O-bound, concurrency, network, or database problems, then apply the right profiling tool for each. - Concrete tooling guidance: Covers Node.js (--prof, clinic.js, heap snapshots), .NET (dotnet-trace, dotnet-counters, dotnet-dump), browser DevTools, SQL query plans (EXPLAIN ANALYZE), and VS Code extension host profiling. - Optimization patterns and budgets: Provides caching, lazy evaluation, batching, debouncing patterns plus benchmarking rules and performance budget tables. - Use Case: A Node.js API endpoint responds in 2 seconds. Use this Skill to capture a CPU profile with clinic flame, identify a hot JSON parsing function, apply caching, and verify the improvement with a benchmark. ## Quick Start Ask the AI to load the performance-profiling skill and help profile why your application endpoint is slow.

Frequently Asked Questions about Performance Profiling

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

FAQPage Schema
How do I profile CPU usage in a Node.js application?▼

Run the app with node --prof and process the log with node --prof-process, or use node --inspect with Chrome DevTools. The clinic.js tool (clinic doctor, clinic flame) is recommended for flame graphs showing hot functions.

How to find memory leaks in JavaScript applications?▼

Take heap snapshots with v8.writeHeapSnapshot or Chrome DevTools and compare them over time. Common leak patterns include uncleared setInterval timers, accumulating event listeners, closure-captured objects, and unbounded Maps or Sets.

What tools profile .NET application performance?▼

Use dotnet-counters for a quick runtime overview, dotnet-trace to collect CPU traces in speedscope format, and dotnet-dump to capture and analyze heap dumps. Visual Studio's Performance Profiler also covers CPU usage.

How do I analyze slow SQL queries?▼

Enable slow query logging (log_min_duration_statement in PostgreSQL, slow_query_log in MySQL), then run EXPLAIN ANALYZE on the query. Look for sequential scans on large tables, row estimate mismatches, and inefficient nested loop joins.

When should I not optimize code performance?▼

Avoid optimization during the prototype phase or before correctness is established. The Skill's inhibitors flag premature optimization: always reproduce the issue, measure a baseline, and profile to find the real hotspot first.

Why is my API response slow even with low CPU usage?▼

Low CPU with high latency usually indicates I/O-bound or network bottlenecks. Break down request time into DNS, TCP, TLS, time-to-first-byte, and download phases, then check for missing keep-alive, large payloads, or sequential waterfall requests.