Burn

Performance Engineering · 2017 · 1 min read

Created a CLI tool to convert performance profiles to hierarchical data for flame graph visualization

Overview

CLI tool that converts various profiling formats (perf, pprof, DTrace, etc.) into hierarchical JSON data compatible with d3-flame-graph, with the ability to generate self-contained HTML flame graphs

Problem

Performance profiles come in many formats (perf, DTrace, stackcollapse), but flame graph visualizations require hierarchical JSON data

Constraints

  • Must support multiple input formats
  • Must produce consistent output format
  • Must be easy to integrate into pipelines

Approach

Built a Go CLI tool with pluggable parsers for different profiling formats, outputting a standardized hierarchical JSON format

Key Decisions

Use Go for CLI

Reasoning:

Go is widely available, has good streaming support for large files, and produces single-binary distributions

Tech Stack

  • Go

Result & Impact

  • 92 stars
    GitHub Stars

Enables engineers to convert profiling data from any source into flame graph visualizations

Learnings

  • CLI tools should support streaming for large files
  • Pluggable architecture allows community contributions

Supported Formats

Burn supports converting from:

  • Linux perf
  • pprof
  • DTrace
  • Stackcollapse format
  • Custom JSON profiles

Burn can also generate self-contained HTML flame graphs from the same data, making it easy to share visualizations.