You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Options:
43
43
-x, --threads <THREADS>
44
44
Number of threads to use when calibrating and scanning [default: 24]
45
45
-p, --updates <UPDATES>
46
-
Seconds between status updates, set to 0 to disable [default: 60]
46
+
Seconds between status updates, set to 0 to disable [default: 20]
47
47
-i, --size-inode-ratio <SIZE_INODE_RATIO>
48
48
Skip calibration and provide directory entry to inode size ratio (typically ~21-32) [default: 0]
49
49
-t, --calibration-path <CALIBRATION_PATH>
@@ -63,3 +63,33 @@ To avoid descending into mounted filesystems (as in find -xdev option), paramete
63
63
It is possible to completely skip calibration phase by manually providing directory inode size to number of entries ratio with `-i` parameter. It makes sense only when you already know the ratio, for example from previous runs.
64
64
65
65
Setting `-p` paramter to 0 will stop program from giving occasional status updates.
66
+
67
+
## Benchmarks
68
+
69
+
### Findlargedir vs GNU find
70
+
71
+
Benchmark setup:
72
+
73
+
```shell
74
+
$ cat bench1.sh
75
+
#!/bin/sh
76
+
find / -xdev -type d -size +200000c
77
+
78
+
$ cat bench2.sh
79
+
#!/bin/sh
80
+
/usr/local/sbin/findlargedir /
81
+
```
82
+
83
+
Actual results:
84
+
85
+
```shell
86
+
$ hyperfine --prepare 'echo 3 | tee /proc/sys/vm/drop_caches' ./bench1.sh ./bench2.sh
87
+
88
+
Benchmark 1: ./bench1.sh
89
+
Time (mean ± σ): 216.122 s ± 1.118 s [User: 1.707 s, System: 10.359 s]
90
+
Range (min … max): 214.701 s … 217.845 s 10 runs
91
+
92
+
Benchmark 1: ./bench2.sh
93
+
Time (mean ± σ): 120.427 s ± 1.978 s [User: 45.438 s, System: 92.729 s]
0 commit comments