Skip to content

klarna-incubator/heapview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

node heap dump visualizer

License Developed at Klarna

Heapview is a tool to help you out in post mortem debugging scenarios.

It's currently under development.

Developing

You'll need Rust to build the parser and server and Node if you wanna work on the UI.

# For backend
cargo run <PATH_TO_FILE>

Developing the UI

To show the chart in the browser, you can start development server:

# Start development server
cd heapview/src/ui/
yarn install
yarn start
# Build to root of project in /dist/ui
yarn build

The UI uses React and D3 for rendering a dynamic SVG. When running development server make sure to also be running the backend since it's the source of analysis.

Roadmap

Realistic

  • Display all nodes and allow search by type, content, etc;
  • Automatically group objects based on similarity;
  • Display a proper TreeMap of everything;

Sci-fi

  • If given a package.json, try and figure which objects come from which deps and general dep weight.
  • TBD

Post mortems

Post mortem debugging usually happens when you can't inspect your processes directly, for instance, when you're running microservices.

In these cases you will have to first produce some heap dumps. One good lib to do so is heapdump. It uses v8 cpp bindings to do so in older versions of node. Since 11.13, you can do it in JS by running v8.getHeapSnapshot().

How to contribute

See our guide on contributing.

Release History

See our changelog.

License

Copyright © 2020 Klarna Bank AB

For license details, see the LICENSE file in the root of this project.