Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.1 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.1 KB

Fold_Files

Display disk usage of some directory tree as a flame graph.

This is a port of the files.pl script, which is part of the FlameGraph repository, to Rust.

Why?: No particular reason.

Installation

cargo install --git https://github.com/stephan-cr/fold_files.git

How to use

fold_files <directory> | perl flamegraph.pl --hash --countname=bytes --nametype=Directory: > out.svg

Alternatively, instead of the original Flamegraph implementation, Inferno might be used.

fold_files --buffered . | inferno-flamegraph --hash --countname=MB --nametype=Directory: --height 24 --factor $(( 1. / 1024 / 1024 )) > out.svg

Note: $(( 1. / 1024 / 1024 )) is zsh specific, bash has something similar, but won't work with floating point numbers. Fish has math.

License

Same license as the original script, which is Apache License 2.0.