Skip to content

Conversation

@Qard
Copy link
Member

@Qard Qard commented Jul 21, 2025

Apparently GH won't let me reopen #2 even though this is an update to the same branch. 🤷🏻

mcollina and others added 4 commits July 21, 2025 23:23
- Add cli.js with Node.js parseArgs interface
- Add webpack build system for static HTML generation
- Add React-based flamegraph viewer template
- Support for pprof binary format parsing and visualization
- Generate standalone HTML files that work without server
- Include WebGL-based rendering for performance
- Support interactive features like zoom, pan, and frame selection

Usage: npm run build:cli && node cli.js <pprof-file>

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add simple-server.js that generates synthetic pprof data compatible with CLI
- Update package.json with @datadog/pprof v5.9.0 devDependency
- Synthetic server creates realistic function hierarchies and CPU distributions
- Resolves format compatibility issues with real @datadog/pprof library

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add automatic gzip detection using magic number (1f 8b)
- Use zlib.gunzipSync() to decompress gzipped pprof files
- Update example-server.js to use port 3002 to avoid conflicts
- CLI now works with both compressed (@datadog/pprof) and uncompressed profiles
- Resolves "Unrecognized value type" errors by properly handling gzipped data

Tested with real @datadog/pprof v5.9.0 output - flamegraphs render correctly
showing Node.js function hierarchies, garbage collection, and stack details.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add CLI section with installation, usage, and workflow examples
- Document support for both gzipped and uncompressed pprof files
- Include example servers (real @datadog/pprof and synthetic)
- Add CLI feature to the main features list
- Provide complete curl examples for profile generation
- Explain the build process and static HTML output

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Qard Qard requested a review from mcollina July 21, 2025 15:33
@Qard Qard merged commit 5d937cc into main Jul 21, 2025
2 of 8 checks passed
@Qard Qard deleted the feature/cli-utility branch July 21, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants