aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bench/lib.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-23 19:44:56 +0900
committernsfisis <nsfisis@gmail.com>2026-07-23 19:44:56 +0900
commit770013c7097b6b5c0c49c7fa46d9235c308c4ad5 (patch)
tree8ff499a4f278d61c872bc697dfa39c895f18e9c0 /scripts/bench/lib.sh
parentc899a4675ca90507a420d901ef7fa26d8b285f23 (diff)
downloadphp-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.tar.gz
php-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.tar.zst
php-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.zip
fix(bench): pin composer binary and work around HTTP/3 slowdown
Benchmarks were comparing against whatever composer happened to be on PATH instead of the pinned submodule version, and paid the HTTP/3 fallback penalty from composer/composer#12987 on every packagist request.
Diffstat (limited to 'scripts/bench/lib.sh')
-rwxr-xr-xscripts/bench/lib.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/bench/lib.sh b/scripts/bench/lib.sh
new file mode 100755
index 00000000..a4fa78ab
--- /dev/null
+++ b/scripts/bench/lib.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# Work around https://github.com/composer/composer/issues/12987:
+apply_http3_workaround() {
+ git -C "$REPO_ROOT/composer" apply "$REPO_ROOT/scripts/bench/disable-http3.patch"
+ trap 'git -C "$REPO_ROOT/composer" restore -- src/Composer/Util/Http/CurlDownloader.php' EXIT
+}