Option to pipe disk usage into flamegraph
Flamegraphs are great for profiling but can be used for disk space also. It would be nice if dua had a CLI option to output results in the folded stack format, so that it could be piped into flamegraph.pl (or more modern alternatives like inferno).
The output format is pretty simple, every file / directory printed on a single line followed by a space and the size in bytes. The path separators are replaced with ;, and whitespace and other special chars are replaced with _. The output does not need to be sorted.
It would also be nice if hard linked files were only counted the first time, but not necessary (I don't think the original files.pl did that).
Thanks a lot for the suggestion and for linking all the resources.
It does indeed look like supporting this format would be quite native to the application data.
There is also another issue about exporting the data to JSON to enable tool use, but I couldn't find the issue right now.