mirror of
https://github.com/astral-sh/uv
synced 2026-01-22 05:50:25 -05:00
Speedup walltime benchmarks by splitting build and run jobs (#17393)
Copies astral-sh/ruff#22126 We can use a larger _and_ less expensive runner for the build step. Total runtime went from 18m -> 15m and most of that time is no longer on the benchmark runner. --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
47
.github/workflows/bench.yml
vendored
47
.github/workflows/bench.yml
vendored
@@ -10,11 +10,11 @@ env:
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
|
||||
jobs:
|
||||
benchmarks-walltime:
|
||||
name: "walltime on aarch64 linux"
|
||||
runs-on: codspeed-macro
|
||||
benchmarks-walltime-build:
|
||||
name: "walltime build"
|
||||
runs-on: depot-ubuntu-22.04-arm-4
|
||||
if: ${{ github.repository == 'astral-sh/uv' }}
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: "Checkout Branch"
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
@@ -40,7 +40,44 @@ jobs:
|
||||
cargo run --bin uv -- pip compile test/requirements/airflow.in --universal --exclude-newer 2024-08-08 --cache-dir .cache
|
||||
|
||||
- name: "Build benchmarks"
|
||||
run: cargo codspeed build --profile profiling -p uv-bench
|
||||
run: cargo codspeed build -m walltime --profile profiling -p uv-bench
|
||||
|
||||
- name: "Create artifact archive"
|
||||
run: tar -cvf benchmarks-walltime.tar target/codspeed target/debug/uv .cache
|
||||
|
||||
- name: "Upload benchmark artifacts"
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: benchmarks-walltime
|
||||
path: benchmarks-walltime.tar
|
||||
retention-days: 1
|
||||
|
||||
benchmarks-walltime-run:
|
||||
name: "walltime on aarch64 linux"
|
||||
runs-on: codspeed-macro
|
||||
needs: benchmarks-walltime-build
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: "Checkout Branch"
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Install codspeed"
|
||||
uses: taiki-e/install-action@d850aa816998e5cf15f67a78c7b933f2a5033f8a # v2.63.3
|
||||
with:
|
||||
tool: cargo-codspeed
|
||||
|
||||
- name: "Download benchmark artifacts"
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: benchmarks-walltime
|
||||
|
||||
- name: "Extract artifact archive"
|
||||
run: tar -xvf benchmarks-walltime.tar
|
||||
|
||||
- name: "Create venv"
|
||||
run: ./target/debug/uv venv --cache-dir .cache
|
||||
|
||||
- name: "Run benchmarks"
|
||||
uses: CodSpeedHQ/action@346a2d8a8d9d38909abd0bc3d23f773110f076ad # v4.4.1
|
||||
|
||||
Reference in New Issue
Block a user