diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-23 19:44:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-23 19:44:56 +0900 |
| commit | 770013c7097b6b5c0c49c7fa46d9235c308c4ad5 (patch) | |
| tree | 8ff499a4f278d61c872bc697dfa39c895f18e9c0 /scripts/bench/lib.sh | |
| parent | c899a4675ca90507a420d901ef7fa26d8b285f23 (diff) | |
| download | php-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-x | scripts/bench/lib.sh | 7 |
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 +} |
