From b9d4b79822ddb4ffe4df8609f560c597a9d0f4e3 Mon Sep 17 00:00:00 2001 From: Mark Rossetti Date: Wed, 15 Jan 2025 02:59:52 -0800 Subject: [PATCH] Updating benchmark testing to support mshv3 features gates and driver Signed-off-by: Mark Rossetti --- .github/workflows/Benchmarks.yml | 6 +++--- .github/workflows/dep_rust.yml | 2 +- Justfile | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Benchmarks.yml b/.github/workflows/Benchmarks.yml index c2665370..302a06d4 100644 --- a/.github/workflows/Benchmarks.yml +++ b/.github/workflows/Benchmarks.yml @@ -17,11 +17,11 @@ jobs: strategy: fail-fast: true matrix: - hypervisor: [hyperv, mshv, kvm] # hyperv is windows, mshv and kvm are linux + hypervisor: [hyperv, mshv, mshv3, kvm] # hyperv is windows, mshv and kvm are linux cpu: [amd, intel] config: [release] # don't want to benchmark debug-builds - runs-on: ${{ fromJson(format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux', matrix.hypervisor == 'hyperv' && 'win2022' || matrix.hypervisor, matrix.cpu)) }} + runs-on: ${{ fromJson(format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux', matrix.hypervisor == 'hyperv' && 'win2022' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor, matrix.cpu)) }} steps: ### Setup ### @@ -67,7 +67,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run Benchmarks - run: just bench-ci main release + run: just bench-ci main release ${{ matrix.hypervisor == 'mshv3' && 'mshv3' || ''}} - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/dep_rust.yml b/.github/workflows/dep_rust.yml index 70ecc252..4930aa90 100644 --- a/.github/workflows/dep_rust.yml +++ b/.github/workflows/dep_rust.yml @@ -118,5 +118,5 @@ jobs: - name: Run benchmarks run: | - just bench-ci main ${{ matrix.config }} + just bench-ci main ${{ matrix.config }} ${{ matrix.hypervisor == 'mshv3' && 'mshv3' || ''}} if: ${{ matrix.config == 'release' }} diff --git a/Justfile b/Justfile index 40c5f721..5e896621 100644 --- a/Justfile +++ b/Justfile @@ -174,11 +174,11 @@ bench-download os hypervisor cpu tag="": tar -zxvf target/benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz -C target/criterion/ --strip-components=1 # Warning: compares to and then OVERWRITES the given baseline -bench-ci baseline target=default-target: - cargo bench --profile={{ if target == "debug" { "dev" } else { target } }} -- --verbose --save-baseline {{ baseline }} +bench-ci baseline target=default-target features="": + cargo bench --profile={{ if target == "debug" { "dev" } else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose --save-baseline {{ baseline }} -bench target=default-target: - cargo bench --profile={{ if target == "debug" { "dev" } else { target } }} -- --verbose +bench target=default-target features="": + cargo bench --profile={{ if target == "debug" { "dev" } else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose # FUZZING fuzz: