aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bench/require.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bench/require.sh')
-rwxr-xr-xscripts/bench/require.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/bench/require.sh b/scripts/bench/require.sh
index 592e0323..0322f24f 100755
--- a/scripts/bench/require.sh
+++ b/scripts/bench/require.sh
@@ -4,6 +4,9 @@ set -euo pipefail
REPO_ROOT="$(git -C "$(dirname "${BASH_SOURCE[0]}")" rev-parse --show-toplevel)"
BIN="$REPO_ROOT/target/release/shirabe"
+COMPOSER_BIN="$REPO_ROOT/composer/bin/composer"
+
+source "$REPO_ROOT/scripts/bench/lib.sh"
PACKAGE="monolog/monolog"
for arg in "$@"; do
@@ -20,6 +23,8 @@ fi
cargo build --manifest-path "$REPO_ROOT/Cargo.toml" --release --bin shirabe
+apply_http3_workaround
+
OUTDIR="${TMPDIR:-/tmp}/shirabe-bench-require-$$"
mkdir -p "$OUTDIR"
cd "$OUTDIR"
@@ -41,8 +46,8 @@ hyperfine \
--export-json "$OUTDIR/results-$PACKAGE_SLUG.json" \
--export-markdown "$OUTDIR/results-$PACKAGE_SLUG.md" \
--ignore-failure \
- "'$BIN' require --no-install --no-audit --no-interaction --working-dir='$TARGET_DIR-shirabe' '$PACKAGE'" \
- "composer require --no-install --no-audit --no-interaction --working-dir='$TARGET_DIR-composer' '$PACKAGE'"
+ --command-name Shirabe "RUST_BACKTRACE=1 '$BIN' require --no-install --no-audit --no-interaction --working-dir='$TARGET_DIR-shirabe' '$PACKAGE'" \
+ --command-name Composer "'$COMPOSER_BIN' require --no-install --no-audit --no-interaction --working-dir='$TARGET_DIR-composer' '$PACKAGE'"
echo ">> results: $OUTDIR/results-$PACKAGE_SLUG.json" >&2
echo ">> $OUTDIR/results-$PACKAGE_SLUG.md" >&2