From 7bac7129f8ccee153c886c23d125219131a1007e Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sun, 30 May 2021 09:31:13 +0700 Subject: [PATCH] ci: benchmark: Add competitors and categories --- .github/workflows/deploy.yaml | 19 +++++++++++++++++++ ci/github-actions/benchmark/matrix.ts | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a18c513a..b721fee9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -557,6 +557,23 @@ jobs: chmod +x "DUA.tmp/${archive_name}/dua" echo "$(pwd)/DUA.tmp/${archive_name}" >> "$GITHUB_PATH" + - name: Install ncdu + run: sudo apt install -y ncdu + + - name: Install gdu + env: + REPO: https://github.com/dundee/gdu + VERSION: '5.0.0' + run: | + mkdir -p GDU.tmp + archive_name="dua-v${VERSION}-x86_64-unknown-linux-musl" + curl -L "${REPO}/releases/download/v${VERSION}/gdu_linux_amd64.tgz" > tmp.gdu.tar.gz + tar xf tmp.dua.tar.gz --directory=GDU.tmp + mkdir -p GDU.tmp/bin + chmod +x "GDU.tmp/${archive_name}" + ln -s "$(pwd)/GDU.tmp/${archive_name}" GDU.tmp/bin/gdu + echo "$(pwd)/GDU.tmp/bin" >> "$GITHUB_PATH" + - name: Install hyperfine env: REPO: https://github.com/sharkdp/hyperfine @@ -575,6 +592,8 @@ jobs: which dust which dutree which dua + which ncdu + which gdu which du which hyperfine diff --git a/ci/github-actions/benchmark/matrix.ts b/ci/github-actions/benchmark/matrix.ts index 101c103e..bb3926bc 100644 --- a/ci/github-actions/benchmark/matrix.ts +++ b/ci/github-actions/benchmark/matrix.ts @@ -93,6 +93,8 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = ['dust', '--apparent-size'], ['dutree'], ['dua', '--apparent-size'], + ['ncdu', '-o', '/dev/stdout', '-0'], + ['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'], ['du', '--apparent-size'], ], }, @@ -103,6 +105,8 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = ['dust'], ['dutree', '--usage'], ['dua'], + ['ncdu', '-o', '/dev/stdout', '-0'], + ['gdu', '--non-interactive', '--no-progress'], ['du'], ], }, @@ -120,6 +124,7 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = competitors: [ ['dutree', '--summary'], ['dua', '--apparent-size'], + ['ncdu', '-o', '/dev/null', '-0'], ['du', '--apparent-size', '--total'], ], }, @@ -128,6 +133,7 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = pduCliArgs: ['--min-ratio=0'], competitors: [ ['dutree'], + ['ncdu', '-o', '/dev/stdout', '-0'], ['du', '--apparent-size'], ], }, @@ -136,6 +142,9 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = pduCliArgs: ['--no-sort'], competitors: [ ['du', '--apparent-size'], + ['dua', '--apparent-size'], + ['ncdu', '-o', '/dev/stdout', '-0'], + ['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'], ], }, { @@ -143,7 +152,17 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] = pduCliArgs: ['--no-sort', '--max-depth=1'], competitors: [ ['dua', '--apparent-size'], + ['ncdu', '-o', '/dev/null', '-0'], + ['gdu', '--show-apparent-size', '--non-interactive', '--no-progress'], ['du', '--apparent-size', '--total'], ], }, + { + id: 'progress', + pduCliArgs: ['--progress'], + competitors: [ + ['ncdu', '-o', '/dev/stdout', '-1'], + ['gdu', '--show-apparent-size', '--non-interactive'], + ], + }, ]