Git Product home page Git Product logo

go-binsize-viz's Introduction

Go executable size visualization using D3

This directory contains code and data to visualize the contents of Go binaries.

Example output

screenshot

How to use

Apply tools in order (Python 3 required):

  1. go tool nm -size <binary file> | c++filt and redirect to some file, e.g. symtab.txt

    (provided with the Go toolchain.)

  2. python3 tab2pydic.py on the previously generated file, redirect to e.g. out.py

  3. python3 simplify.py on the previously generated file, redirect to data.js specifically

  4. python3 -m http.server

  5. open browser on http://localhost:8000/treemap_v3.html

Using Docker

For example:

docker run -v $GOPATH/bin/:/go/bin -p 8000:8000 odedp/go-binsize-viz -b /go/bin/dep

(Use -b to target the Go executable.)

Included example data using CockroachDB

  1. python3 -m http.server

  2. open browser on http://localhost:8000/cockroach_sizes.html

Origin of the D3 viz source code

This repo uses D3 visualization code inspired from / modifying the following sources:

Licensing

The Python bits (and thus the Docker embedding) are licensed under the Affero GPL3. This requires derived software to also use AGPL3, and prevents network usage without distribution of source code.

The D3 / Javascript bits in app3.js (see previous section) are currently UNLICENSED. They cannot be reused in derived work or other applications without direct permission from the original author.

The files in the js subdirectory are imported from the D3.js project (https://d3js.org/) and are licensed under the terms of the 3-Clause BSD license.

go-binsize-viz's People

Contributors

knz avatar nono avatar odedpriva avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.