Skip to content

Commit 88044c6

Browse files
committed
readme + 1.7.0 version bumps
1 parent 8b707f5 commit 88044c6

File tree

5 files changed

+36
-14
lines changed

5 files changed

+36
-14
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[package]
22
name = "erdtree"
3-
version = "1.6.0"
3+
version = "1.7.0"
44
edition = "2021"
55
authors = ["Benjamin Nguyen <[email protected]>"]
66
description = """
7-
erdtree (et) is vibrant multi-threaded filetree visualizer and disk usage analyzer
8-
that respects .gitignore and hidden file rules by default.
7+
erdtree (et) is a multi-threaded file-tree visualization and disk usage
8+
analysis tool that respects gitignore and hidden file rules offering a modern
9+
alternative to tree and du.
910
"""
1011
documentation = "https://github.com/solidiquis/erdtree"
1112
homepage = "https://github.com/solidiquis/erdtree"

README.md

+29-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Packaging status](https://repology.org/badge/tiny-repos/erdtree.svg)](https://repology.org/project/erdtree/versions)
66
[![Crates.io](https://img.shields.io/crates/d/erdtree)](https://crates.io/crates/erdtree)
77

8-
A modern, vibrant, and multi-threaded file-tree visualizer and disk usage analyzer that respects hidden files and `.gitignore` rules by default i.e. the secret love child of [tree](https://en.wikipedia.org/wiki/Tree_(command)) and [du](https://en.wikipedia.org/wiki/Du_(Unix)).
8+
A modern, multi-threaded file-tree visualization and disk usage analysis tool that respects hidden file and `.gitignore` i.e. the secret love child of [tree](https://en.wikipedia.org/wiki/Tree_(command)) and [du](https://en.wikipedia.org/wiki/Du_(Unix)).
99

1010
<p align="center">
1111
<img src="https://github.com/solidiquis/erdtree/blob/master/assets/demo.png?raw=true" alt="failed to load picture" />
@@ -22,6 +22,7 @@ A modern, vibrant, and multi-threaded file-tree visualizer and disk usage analyz
2222
* [Installation](#installation)
2323
* [Info](#info)
2424
- [Configuration file](#configuration-file)
25+
- [Parallelism](#parallelism)
2526
- [Binary prefix or SI prefix](#binary-prefix-or-si-prefix)
2627
- [Logical or physical disk usage](#logical-or-physical-disk-usage)
2728
- [How are directory sizes computed](#how-are-directory-sizes-computed)
@@ -54,8 +55,6 @@ If the chosen defaults don't meet your requirements and you don't want to bloat
5455

5556
## Usage
5657

57-
**Note**: The amount of threads used by default is dependent upon how many logical CPUs available in your system.
58-
5958
```
6059
erdtree (et) is a multi-threaded filetree visualizer and disk usage analyzer.
6160
@@ -158,15 +157,37 @@ Arguments passed to `erdtree` take precedence. If you have a config that you wou
158157
Here is an example of a valid config:
159158

160159
```
161-
$ cat $HOME/.erdtreerc
162-
--level 2
160+
$ cat $HOME/.config/erdtree/.erdtreerc
161+
# Long or short names work
162+
-s size
163+
164+
# I prefer physical size
165+
--disk-usage physical
166+
167+
# ooo pwetty
163168
--icons
164-
--scale 3
165169
166-
# You can use the short names too
167-
-s size
170+
# This is prettier.. thanks bryceberger
171+
--size-left
172+
--prune
168173
```
169174

175+
### Parallelism
176+
177+
A common question people have about `erdtree` is how it benefits from parallelism when disk I/O does serial processing, i.e. it can only ever service one request at a time.
178+
179+
The idea behind leveraging parallelism for disk reads is that despite serial processing you'll still get higher throughput as saturating the disk queue depth with user-space requests allows it to process requests in aggregate rather than waiting for a single-thread to send a single request at a time and doing some CPU-bound work with the response before sending another.
180+
181+
Here are some crude benchmarks demonstrating the relationship between performance and thread-count.
182+
183+
<p align="center">
184+
<img src="https://github.com/solidiquis/erdtree/blob/master/assets/thread_performance.png?raw=true" alt="failed to load png" />
185+
</p>
186+
187+
It's important to note that some parallelism does improve performance but after a certain threshold you do get dimishing returns. As [Amdahl's law](https://en.wikipedia.org/wiki/Amdahl%27s_law) suggests, there is an asymptotic threshold for the speedup which is a function of thread-count. Once you've approached that threshold you're just paying the additional cost of managing a larger thread-pool with no added benefit.
188+
189+
If you'd like more rigorous empirical data going into how parallelism benefits both SSD and HDD checkout [this article](https://pkolaczk.github.io/disk-parallelism/).
190+
170191
### Binary prefix or SI Prefix
171192

172193
Disk usage is reported using binary prefixes by default (e.g. `1 KiB = 1024 B`) as opposed to SI prefixes (`1 KB = 1000 B`). To toggle between the two use the `-p, --prefix` option.

assets/thread_performance.png

228 KB
Loading

src/render/context/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ mod test;
2323
#[derive(Parser, Debug)]
2424
#[command(name = "erdtree")]
2525
#[command(author = "Benjamin Nguyen. <[email protected]>")]
26-
#[command(version = "1.6.0")]
27-
#[command(about = "erdtree (et) is a multi-threaded filetree visualizer and disk usage analyzer.", long_about = None)]
26+
#[command(version = "1.7.0")]
27+
#[command(about = "erdtree (et) is a multi-threaded file-tree visualization and disk usage analysis tool.", long_about = None)]
2828
pub struct Context {
2929
/// Include aggregate file count in tree output
3030
#[arg(short, long)]

0 commit comments

Comments
 (0)