performance-profiler

Profiles CPU, memory, and database bottlenecks in Node.js, Python, and Go applications.

2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill performance-profiler-bryanpinheiro77
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-profiler
Source: https://github.com/BryanPinheiro77/FinanceBot-BackEnd/tree/main/.agents/skills/performance-profiler
Command: npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill performance-profiler-bryanpinheiro77

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Slow endpoints, memory leaks, bloated bundles, and N+1 database queries are hard to diagnose without systematic profiling. This Skill provides a structured measure-first workflow to find the real bottleneck, fix it, and verify the improvement with before/after metrics. ## Core Features & Use Cases - CPU and Memory Profiling: Generate flamegraphs with clinic.js, py-spy, and Go pprof; capture heap snapshots and detect event loop blocking. - Database and Bundle Analysis: Run EXPLAIN ANALYZE, detect N+1 queries, and audit bundle size with webpack-bundle-analyzer and source-map-explorer. - Load Testing: Run k6 and Artillery scenarios with ramp-up stages and P95/P99 latency thresholds. - Use Case: Your API's P99 latency exceeds SLA before a release. Run the profiler script to flag risk indicators, generate a flamegraph to find the hot code path, fix the N+1 query, then re-run a k6 load test to confirm the improvement. ## Quick Start Ask the assistant to profile your project for performance bottlenecks by running the performance profiler script against your project directory and reviewing the report.

Frequently Asked Questions about performance-profiler

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

FAQPage Schema
How do I profile a Node.js application for CPU bottlenecks?▼

Use clinic.js to generate a CPU flamegraph by running clinic flame with your server entry point while applying load with autocannon. Alternatively, use the built-in node --prof flag and process the log with node --prof-process.

How to detect memory leaks in a running Python or Node.js service?▼

For Python, attach py-spy to the running process and record a flamegraph without code changes. For Node.js, capture heap snapshots via v8.writeHeapSnapshot at intervals and compare them in Chrome DevTools to spot retained objects.

How do I find and fix N+1 database queries?▼

Enable query logging or pg_stat_statements in PostgreSQL to count queries per request, then confirm with EXPLAIN ANALYZE. Fix N+1 patterns by replacing per-row queries with a single JOIN or batched fetch.

Can I run load tests with k6 before a production release?▼

Yes, k6 scripts define ramp-up stages, virtual user counts, and thresholds like p(95) under 500ms. Run them against a staging environment with production-like data volumes, never against live production.

Why should I measure baseline metrics before optimizing?▼

Without a baseline you cannot confirm the fix worked or that you optimized the real bottleneck. Record P50, P95, P99 latency, RPS, error rate, and memory usage before changing anything, then re-measure after.