Add pprof-to-md integration for LLM-friendly markdown analysis #58
+344
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates pprof-to-md to generate LLM-friendly markdown analysis files alongside the existing HTML flamegraphs and pb files. This makes profile data more accessible to LLMs and automated analysis tools while maintaining full backward compatibility.
Key Features
.mdfiles alongside HTML flamegraphs--md-formatflag:summary: Overview with top functions (default)detailed: Full call stacks and comprehensive dataadaptive: Intelligent format selection based on profile sizeChanges Implemented
Dependencies & Requirements (
package.json)pprof-to-mddependency>=22.6.0Core Library (
lib/index.js)generateMarkdown()function with format supportgenerateFlamegraph()APIPreload Script (
preload.js)CLI Enhancement (
bin/flame.js)--md-formatflag forrunandgeneratecommandsDocumentation (
README.md)--md-formatflag usageTest Coverage
test/lib.test.jsforgenerateMarkdown()test/cli.test.jsfor--md-formatflagtest/integration.test.jsTest Plan
Example Usage
Related Documentation
🤖 Generated with Claude Code