GitHub - knz/go-binsize-viz: Size visualization of Go executables using D3
source link: https://github.com/knz/go-binsize-viz
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Go executable size visualization using D3
This directory contains code and data to visualize the contents of Go binaries.
Example output
How to use
Apply tools in order (Python 3 required):
-
go tool nm -size <binary file> | c++filt
and redirect to some file, e.g.symtab.txt
(provided with the Go toolchain.)
-
python3 tab2pydic.py
on the previously generated file, redirect to e.g.out.py
-
python3 simplify.py
on the previously generated file, redirect todata.js
specifically -
python3 -m http.server
-
open browser on http://localhost:8000/treemap_v3.html
Included example data using CockroachDB
-
python3 -m http.server
-
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:
-
Jacques Jahnichen's zoomable treemap at http://bl.ocks.org/JacquesJahnichen/42afd0cde7cbf72ecb81
-
ported to D3 v4 by Guglielmo Celata at http://bl.ocks.org/guglielmo/16d880a6615da7f502116220cb551498
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK