diff --git a/README.md b/README.md index 035d95d..6776240 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ - **Dual Profiling**: Captures both CPU and heap profiles concurrently for comprehensive performance insights - **Auto-Start Profiling**: Profiling starts immediately when using `flame run` (default behavior) - **Automatic Flamegraph Generation**: Interactive HTML flamegraphs are created automatically for both CPU and heap profiles on exit +- **LLM-Friendly Markdown Analysis**: Generates markdown reports with hotspot analysis, ideal for AI-assisted performance debugging - **Sourcemap Support**: Automatically translates transpiled code locations back to original source files (TypeScript, bundled JavaScript, etc.) - **Clear File Path Display**: Shows exact paths and browser URLs for generated files - **Manual Control**: Optional manual mode with signal-based control using `SIGUSR2` @@ -34,10 +35,11 @@ flame run server.js # 🔥 Heap profile written to: heap-profile-2025-08-27T12-00-00-000Z.pb # 🔥 Generating CPU flamegraph... # 🔥 CPU flamegraph generated: cpu-profile-2025-08-27T12-00-00-000Z.html +# 🔥 CPU markdown generated: cpu-profile-2025-08-27T12-00-00-000Z.md # 🔥 Generating heap flamegraph... # 🔥 Heap flamegraph generated: heap-profile-2025-08-27T12-00-00-000Z.html +# 🔥 Heap markdown generated: heap-profile-2025-08-27T12-00-00-000Z.md # 🔥 Open file:///path/to/cpu-profile-2025-08-27T12-00-00-000Z.html in your browser to view the CPU flamegraph -# 🔥 Open file:///path/to/heap-profile-2025-08-27T12-00-00-000Z.html in your browser to view the heap flamegraph ``` ### Manual Profiling Mode @@ -53,14 +55,17 @@ kill -USR2 flame toggle ``` -### Generate Flamegraph +### Generate Flamegraph and Markdown ```bash -# Generate HTML flamegraph from pprof file +# Generate HTML flamegraph and markdown from pprof file flame generate cpu-profile-2024-01-01T12-00-00-000Z.pb # Specify custom output file flame generate -o my-flamegraph.html profile.pb.gz + +# Use detailed markdown format for comprehensive analysis +flame generate --md-format=detailed profile.pb ``` ## CLI Usage @@ -70,7 +75,7 @@ flame [options] Commands: run