Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 90 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ tui-crossplatform = [
"crossterm",
"dep:signal-hook",
"tui",
"open",
"unicode-segmentation",
"unicode-width",
]
Expand All @@ -66,6 +65,7 @@ byte-unit = { version = "5.2.5", features = ["u128"] }
itertools = "0.15.0"
num_cpus = "1.10.0"
anyhow = "1.0.31"
inferno = { version = "0.12.8", default-features = false }
trash = { version = "5.2.0", optional = true, default-features = false, features = [
"coinit_apartmentthreaded", "chrono"
] }
Expand All @@ -78,7 +78,7 @@ crossterm = { version = "0.29.0", optional = true }
tui = { package = "ratatui", version = "0.30.2", optional = true, default-features = false, features = [
"crossterm",
] }
open = { version = "5.0", optional = true }
open = "5.0"
wild = "2.0.4"
owo-colors = "4.0.0"
human_format = "1.0.3"
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,20 @@ LANG=ja_JP.UTF-8 dua i # then press '?' for the Japanese help screen

### Flame graphs

The `aggregate --stack` option prints the traversal as folded stacks - the "collapsed" format read
by flame-graph tools like [`inferno`](https://github.com/jonhoo/inferno).
Each line is an entry's path with `;` between its components, a space, and its size
in bytes, so an interactive drill-down can be turned into a single shareable SVG:
`dua stacks` prints folded stacks—the "collapsed" interchange format read by flame-graph tools.
Each line is an entry's path with `;` between its components, a space, and its size in bytes:

```bash
dua aggregate --stack | inferno-flamegraph > disk-usage.svg
dua stacks > disk-usage.folded
```

`dua flamegraph` renders the same data with [`inferno`](https://github.com/jonhoo/inferno), writes
the SVG to a temporary file, and opens it. Pass an output path to write the SVG without opening it.
Both commands accept the usual traversal options as well as `--depth` and `--import`:

```bash
dua flamegraph
dua flamegraph -o disk-usage.svg
```

### Configuration
Expand Down
Loading
Loading