Skip to content
mgleason97Public

About

Generate flamegraphs from nested json

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

engulf

engulf is a small command-line utility that analyses a JSON document and converts it into an interactive SVG flame graph. This lets you see the shape and size of your JSON at a glance – perfect for spotting the largest objects or simply getting an overview of deeply nested data.

CLI usage

Usage: engulf [OPTIONS] <INPUT>

Arguments:
  <INPUT>  Input JSON file

Options:
  -o, --output <OUTPUT>    Output file
      --group-by <KEY>...  Group array elements (objects) by one or more keys
  -h, --help               Print help
  -V, --version            Print version

Quick example

# Analyse `data.json`, grouping array elements by their `type` field, and
# write the SVG flame graph to `data.svg`.

engulf data.json --group-by type -o data.svg

# Open `data.svg` in your browser to interact.

This is the svg produced from a temporal agent run. Open the svg in your browser to interact. Agent run workflow byte flamegraph

WebAssembly demo

To build the local wasm package and run the Vite demo:

# Build the wasm package (requires wasm-pack)
just wasm-build

# Install and run the demo UI
cd www
npm install
npm run dev

The demo imports the local wasm package from crates/engulf-wasm/pkg and renders an SVG after you submit JSON in the UI.

About

Generate flamegraphs from nested json

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages