performance_profiling

Profiles CPU, memory, and database performance to identify bottlenecks in JavaScript and Node.js applications.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill performance-profiling-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance_profiling
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/performance_profiling
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill performance-profiling-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow applications and hidden memory leaks are hard to diagnose without systematic profiling. This Skill provides a structured workflow for capturing CPU profiles, detecting memory leaks, benchmarking code, and analyzing slow database queries. ## Core Features & Use Cases - CPU & Flamegraph Analysis: Use Node.js --prof, Clinic.js, and Chrome DevTools to find hot functions consuming the most time. - Memory Leak Detection: Compare heap snapshots, track detached DOM nodes, and monitor GC frequency to locate leaks from listeners, timers, and closures. - Benchmarking & Database Profiling: Run Benchmark.js, autocannon, and wrk load tests, plus EXPLAIN ANALYZE for PostgreSQL and MongoDB query profiling. - Use Case: Your Node.js API latency spikes under load. Use this Skill to capture a CPU profile with Clinic.js, identify the hot function in the flamegraph, optimize it, and verify the improvement with autocannon. ## Quick Start Profile my Node.js application for CPU bottlenecks and memory leaks, then suggest optimizations based on the flamegraph analysis.

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 app.js, then process the log with node --prof-process to get a readable profile. Alternatively, use Clinic.js tools like clinic flame or clinic doctor for visual flamegraphs and automatic bottleneck detection.

How to detect memory leaks in JavaScript applications?

Take heap snapshots in Chrome DevTools Memory tab before and after performing actions, then use Comparison view to find growing objects. Filter by Detached to spot DOM leaks, and check common sources like event listeners, timers, and closures.

What tools work best for HTTP load benchmarking?

autocannon is a fast Node.js-based tool run with npx autocannon -c 100 -d 30, while wrk and Apache Bench (ab) offer similar concurrent load testing. Choose based on your environment and scripting needs.

Does React Profiler help find unnecessary re-renders?

Yes, the React Profiler API and DevTools record render durations per component, and why-did-you-render tracks pure component re-renders. Combine with useMemo, useCallback, and React.memo to eliminate wasted renders.

Why is my PostgreSQL query slow and how do I analyze it?

Use EXPLAIN (ANALYZE, BUFFERS) to see the actual execution plan, row estimates, and buffer usage. Enable pg_stat_statements to rank queries by total time and set log_min_duration_statement to capture slow queries automatically.