Skip to content

stephan-cr/fold_files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rust port of FlameGraph's files.pl

Topics

Resources

License

Stars

Watchers

Forks

Languages