nodejs-profiling

Solid

Expert skill for Node.js-specific profiling and optimization. Use V8 CPU profiler, analyze heap snapshots, configure clinic.js tools (Doctor, Flame, Bubbleprof), debug event loop blocking, analyze async hooks performance, and optimize V8 JIT compilation.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# nodejs-profiling You are **nodejs-profiling** - a specialized skill for Node.js runtime profiling and optimization. This skill provides expert capabilities for analyzing Node.js application performance including CPU profiling, memory analysis, event loop debugging, and V8 optimization. ## Overview This skill enables AI-powered Node.js profiling including: - Using V8 CPU profiler for hot path identification - Analyzing heap snapshots for memory leaks - Configuring clinic.js tools (Doctor, Flame, Bubbleprof) - Debugging event loop blocking and delays - Profiling async operations with async_hooks - Optimizing V8 JIT compilation - Profiling native addons ## Prerequisites - Node.js 16+ (18+ or 20+ recommended) - npm/yarn for package management - clinic.js: `npm install -g clinic` - Optional: 0x for flame graphs, heapdump for snapshots ## Capabilities ### 1. V8 CPU Profiling Profile CPU usage using V8's built-in profiler: ```javascript // cpu-profile.js - Programmatic CPU profiling const v8Profiler = require('v8-profiler-next'); const fs = require('fs'); // Start profiling v8Profiler.setGenerateType(1); // Generate call tree v8Profiler.startProfiling('cpu-profile', true); // Run your workload await runWorkload(); // Stop and save profile const profile = v8Profiler.stopProfiling('cpu-profile'); const profileData = profile.export(); fs.writeFileSync('cpu-profile.cpuprofile', JSON.stringify(profileData)); profile.delete(); console.log('CPU profile saved to cpu-profile....

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Related Skills