Skip to content

Commit

Permalink
Cleaning up the benchmark workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
doggydogworld committed Aug 7, 2024
1 parent 62b31ac commit 55c3691
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark-code-nonroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
- name: Run Benchmarks Once
timeout-minutes: 5
shell: bash # Overriding default shell which is `sh -e`
run: make test-go-bench | tee bench.json | sed -u -E "s/^(FAIL\s+github)/::error title=Benchmark Failed::\1/"
run: make test-go-bench | sed -u -E "s/^(FAIL\s+github)/::error title=Benchmark Failed::\1/"

- name: Construct Summary
shell: bash
run: |
go install golang.org/x/perf/cmd/benchstat@latest
benchstat test-logs/bench.txt | sed -E -e 's/^pkg:\s+(github.*)/## \1\n\n```/' -e 's/^(geomean.*)/\1\n```/' >> "$GITHUB_STEP_SUMMARY"
go run golang.org/x/perf/cmd/benchstat@latest test-logs/bench.txt \
| sed -E -e 's/^pkg:\s+(github.*)/## \1\n\n```/' -e 's/^(geomean.*)/\1\n```/' >> "$GITHUB_STEP_SUMMARY"
8 changes: 4 additions & 4 deletions .github/workflows/benchmark-code-root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
name: Benchmarks (Root)
needs: changes
if: ${{ !startsWith(github.head_ref, 'dependabot/') && needs.changes.outputs.changed == 'true' }}
runs-on: ubuntu-22.04-16core
runs-on: ubuntu-22.04-32core

permissions:
contents: read
Expand All @@ -61,11 +61,11 @@ jobs:
- name: Run Benchmarks Once
timeout-minutes: 5
shell: bash # Overriding default shell which is `sh -e`
run: make test-go-bench-root | tee bench.json | sed -u -E "s/^(FAIL\s+github)/::error title=Benchmark Failed::\1/"
run: make test-go-bench-root | sed -u -E "s/^(FAIL\s+github)/::error title=Benchmark Failed::\1/"

- name: Construct Summary
shell: bash
run: |
go install golang.org/x/perf/cmd/benchstat@latest
benchstat test-logs/bench.txt | sed -E -e 's/^pkg:\s+(github.*)/## \1\n\n```/' -e 's/^(geomean.*)/\1\n```/' >> "$GITHUB_STEP_SUMMARY"
go run golang.org/x/perf/cmd/benchstat@latest test-logs/bench.txt \
| sed -E -e 's/^pkg:\s+(github.*)/## \1\n\n```/' -e 's/^(geomean.*)/\1\n```/' >> "$GITHUB_STEP_SUMMARY"

0 comments on commit 55c3691

Please sign in to comment.