From dad62d55e4d842a031cac89e8eef460f1d6c51e5 Mon Sep 17 00:00:00 2001 From: Eduard Karacharov Date: Sun, 23 Jun 2024 15:42:18 +0300 Subject: [PATCH] temp: benchmarks workflow --- .github/workflows/benchmarks.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/benchmarks.yml diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml new file mode 100644 index 000000000000..5f7b9fc1faba --- /dev/null +++ b/.github/workflows/benchmarks.yml @@ -0,0 +1,42 @@ +name: benchmarks + +on: + pull_request: + +jobs: + row-format-bench: + name: Row format bench + runs-on: ubuntu-latest + container: + image: amd64/rust + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup Rust toolchain + uses: ./.github/actions/setup-builder + - name: Python-dev + run: | + apt-get update + apt-get install -yq python3.11-dev + - name: Install critcmp + run: cargo install --force critcmp + - name: Benchmark branch + run: | + echo BRANCH_COMMIT=`git log -n1 --oneline` >> $GITHUB_ENV + cargo bench --all-features --color always --bench row_format -- --save-baseline branch + - name: Checkout master + uses: actions/checkout@v4 + with: + submodules: true + clean: false + ref: master + - name: Benchmark master + run: | + echo MASTER_COMMIT=`git log -n1 --oneline` >> $GITHUB_ENV + cargo bench --all-features --color always --bench row_format -- --save-baseline master + - name: Compare benchmark results + run: | + echo "Branch: ${{ env.BRANCH_COMMIT }}" + echo "Master: ${{ env.MASTER_COMMIT }}" + critcmp --color always master branch