Skip to content

On recovery, set UVM descriptor SVN to minimum of existing KV value and startup endorsements #2236

On recovery, set UVM descriptor SVN to minimum of existing KV value and startup endorsements

On recovery, set UVM descriptor SVN to minimum of existing KV value and startup endorsements #2236

Workflow file for this run

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
name: "Benchmark A/B Testing"
on:
pull_request:
types:
- labeled
- synchronize
- opened
- reopened
permissions: read-all
jobs:
benchmark_pr:
name: Benchmark PR
runs-on:
[
self-hosted,
1ES.Pool=gha-vmss-d16av5-ci,
"JobId=bab_benchmark_pr-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
if: &check_trigger_conditions ${{ (github.event.action == 'labeled' && github.event.label.name == 'bench-ab') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'bench-ab')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
container:
image: mcr.microsoft.com/azurelinux/base/core:3.0
options: --user root
steps:
- name: Setup container dependencies
run: |
gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
tdnf -y update && tdnf -y install ca-certificates git
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install dependencies
run: ./scripts/setup-ci.sh
- name: Confirm platform
run: python3 tests/infra/platform_detection.py virtual
- name: Build and run benchmarks
run: |
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
cmake -GNinja -DWORKER_THREADS=2 ..
ninja
# Microbenchmarks
./tests.sh -VV -L benchmark
# End to end performance tests
./tests.sh -VV -L perf -C perf
# Convert microbenchmark output to bencher json
source env/bin/activate
PYTHONPATH=../tests python convert_pico_to_bencher.py
- name: Upload PR results
uses: actions/upload-artifact@v7
with:
name: benchmark-pr-${{ github.run_id }}
path: build/bencher.json
retention-days: 7
benchmark_main:
name: Benchmark Main
runs-on:
[
self-hosted,
1ES.Pool=gha-vmss-d16av5-ci,
"JobId=bab_benchmark_main-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
if: *check_trigger_conditions
container:
image: mcr.microsoft.com/azurelinux/base/core:3.0
options: --user root
steps:
- name: Setup container dependencies
run: |
gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
tdnf -y update && tdnf -y install ca-certificates git
- uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
- name: Install dependencies
run: ./scripts/setup-ci.sh
- name: Confirm platform
run: python3 tests/infra/platform_detection.py virtual
- name: Build and run benchmarks
run: |
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
cmake -GNinja -DWORKER_THREADS=2 ..
ninja
# Microbenchmarks
./tests.sh -VV -L benchmark
# End to end performance tests
./tests.sh -VV -L perf -C perf
# Convert microbenchmark output to bencher json
source env/bin/activate
PYTHONPATH=../tests python convert_pico_to_bencher.py
- name: Upload main results
uses: actions/upload-artifact@v7
with:
name: benchmark-main-${{ github.run_id }}
path: build/bencher.json
retention-days: 7
compare:
name: Compare Results
runs-on:
[
self-hosted,
1ES.Pool=gha-vmss-d16av5-ci,
"JobId=bab_compare-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
container:
image: mcr.microsoft.com/azurelinux/base/core:3.0
options: --user root
needs: [benchmark_pr, benchmark_main]
if: *check_trigger_conditions
steps:
- name: Setup container dependencies
run: |
gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
tdnf -y update && tdnf -y install ca-certificates git
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: benchmark-*-${{ github.run_id }}
merge-multiple: false
- name: Generate comparison
run: |
echo "# Benchmark Comparison: main vs PR" > report.md
echo "" >> report.md
echo "**PR Commit:** \`${{ github.event.pull_request.head.sha }}\`" >> report.md
echo "**Base Commit:** \`${{ github.event.pull_request.base.sha }}\`" >> report.md
echo "**Run ID:** [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> report.md
echo "" >> report.md
echo '```' >> report.md
python3 scripts/compare_bencher_ab.py \
benchmark-main-${{ github.run_id }}/bencher.json \
benchmark-pr-${{ github.run_id }}/bencher.json \
--label1 "main" --label2 "PR" >> report.md
echo '```' >> report.md
cat report.md >> $GITHUB_STEP_SUMMARY