Skip to content

Commit 7bac712

Browse files
committed
ci: benchmark: Add competitors and categories
1 parent 97749ab commit 7bac712

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,23 @@ jobs:
557557
chmod +x "DUA.tmp/${archive_name}/dua"
558558
echo "$(pwd)/DUA.tmp/${archive_name}" >> "$GITHUB_PATH"
559559
560+
- name: Install ncdu
561+
run: sudo apt install -y ncdu
562+
563+
- name: Install gdu
564+
env:
565+
REPO: https://github.com/dundee/gdu
566+
VERSION: '5.0.0'
567+
run: |
568+
mkdir -p GDU.tmp
569+
archive_name="dua-v${VERSION}-x86_64-unknown-linux-musl"
570+
curl -L "${REPO}/releases/download/v${VERSION}/gdu_linux_amd64.tgz" > tmp.gdu.tar.gz
571+
tar xf tmp.dua.tar.gz --directory=GDU.tmp
572+
mkdir -p GDU.tmp/bin
573+
chmod +x "GDU.tmp/${archive_name}"
574+
ln -s "$(pwd)/GDU.tmp/${archive_name}" GDU.tmp/bin/gdu
575+
echo "$(pwd)/GDU.tmp/bin" >> "$GITHUB_PATH"
576+
560577
- name: Install hyperfine
561578
env:
562579
REPO: https://github.com/sharkdp/hyperfine
@@ -575,6 +592,8 @@ jobs:
575592
which dust
576593
which dutree
577594
which dua
595+
which ncdu
596+
which gdu
578597
which du
579598
which hyperfine
580599

ci/github-actions/benchmark/matrix.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
9393
['dust', '--apparent-size'],
9494
['dutree'],
9595
['dua', '--apparent-size'],
96+
['ncdu', '-o', '/dev/stdout', '-0'],
97+
['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'],
9698
['du', '--apparent-size'],
9799
],
98100
},
@@ -103,6 +105,8 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
103105
['dust'],
104106
['dutree', '--usage'],
105107
['dua'],
108+
['ncdu', '-o', '/dev/stdout', '-0'],
109+
['gdu', '--non-interactive', '--no-progress'],
106110
['du'],
107111
],
108112
},
@@ -120,6 +124,7 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
120124
competitors: [
121125
['dutree', '--summary'],
122126
['dua', '--apparent-size'],
127+
['ncdu', '-o', '/dev/null', '-0'],
123128
['du', '--apparent-size', '--total'],
124129
],
125130
},
@@ -128,6 +133,7 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
128133
pduCliArgs: ['--min-ratio=0'],
129134
competitors: [
130135
['dutree'],
136+
['ncdu', '-o', '/dev/stdout', '-0'],
131137
['du', '--apparent-size'],
132138
],
133139
},
@@ -136,14 +142,27 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
136142
pduCliArgs: ['--no-sort'],
137143
competitors: [
138144
['du', '--apparent-size'],
145+
['dua', '--apparent-size'],
146+
['ncdu', '-o', '/dev/stdout', '-0'],
147+
['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'],
139148
],
140149
},
141150
{
142151
id: 'no-sort+summary',
143152
pduCliArgs: ['--no-sort', '--max-depth=1'],
144153
competitors: [
145154
['dua', '--apparent-size'],
155+
['ncdu', '-o', '/dev/null', '-0'],
156+
['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'],
146157
['du', '--apparent-size', '--total'],
147158
],
148159
},
160+
{
161+
id: 'progress',
162+
pduCliArgs: ['--progress'],
163+
competitors: [
164+
['ncdu', '-o', '/dev/stdout', '-1'],
165+
['gdu', '--show-apparent-size', '--non-interactive'],
166+
],
167+
},
149168
]

0 commit comments

Comments
 (0)