From 418831f65681006624dd4e0835bec999537d581a Mon Sep 17 00:00:00 2001 From: Maria Ines Parnisari Date: Thu, 23 Nov 2023 10:55:51 -0800 Subject: [PATCH] add CPU info --- .github/workflows/main.yaml | 8 ++++++-- .github/workflows/prs.yaml | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ecf1c87..025b845 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -39,10 +39,14 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} comment-on-alert: true + - name: Get CPU information + uses: kenchan0130/actions-system-info@master + id: system-info + - name: Save benchmark JSON uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ./cache/benchmark-data.json # Save with commit hash to avoid "cache already exists" - # Save with OS to prevent comparing against results from different CPUs - key: ${{ github.sha }}-${{ runner.os }}-go-benchmark \ No newline at end of file + # Save with OS & CPU info to prevent comparing against results from different CPUs + key: ${{ github.sha }}-${{ runner.os }}-${{ steps.system-info.outputs.cpu-model }}-go-benchmark \ No newline at end of file diff --git a/.github/workflows/prs.yaml b/.github/workflows/prs.yaml index c9d0381..f4f1072 100644 --- a/.github/workflows/prs.yaml +++ b/.github/workflows/prs.yaml @@ -27,6 +27,10 @@ jobs: set -o pipefail make bench | tee ${{ github.sha }}_bench_output.txt + - name: Get CPU information + uses: kenchan0130/actions-system-info@master + id: system-info + - name: Get Main branch SHA id: get-main-branch-sha run: | @@ -38,7 +42,7 @@ jobs: id: cache with: path: ./cache/benchmark-data.json - key: ${{ steps.get-main-branch-sha.outputs.sha }}-${{ runner.os }}-go-benchmark + key: ${{ steps.get-main-branch-sha.outputs.sha }}-${{ runner.os }}-${{ steps.system-info.outputs.cpu-model }}-go-benchmark - name: Compare benchmarks with Main uses: benchmark-action/github-action-benchmark@v1