2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-04-22 16:50:18 +08:00

Fix benchstat

This commit is contained in:
Ken Hibino 2021-01-29 22:57:12 -08:00
parent bcc639d083
commit 5f99c4378f

View File

@ -1,10 +1,8 @@
# This workflow runs benchmarks against the current branch, compares them to benchmarks against # This workflow runs benchmarks against the current branch,
# master, and uploads the results as an artifact. # compares them to benchmarks against master,
# and uploads the results as an artifact.
# TODO: This workflow could be improved by only running on pull requests and then posting the results back name: benchstat
# as a comment in the pull request.
name: Benchstat
on: [pull_request] on: [pull_request]
@ -24,12 +22,12 @@ jobs:
with: with:
go-version: 1.15.x go-version: 1.15.x
- name: Benchmark - name: Benchmark
run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a bench.txt run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a new.txt
- name: Upload Benchmark - name: Upload Benchmark
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: bench-incoming name: bench-incoming
path: bench.txt path: new.txt
current: current:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -48,12 +46,12 @@ jobs:
with: with:
go-version: 1.15.x go-version: 1.15.x
- name: Benchmark - name: Benchmark
run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a bench.txt run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a old.txt
- name: Upload Benchmark - name: Upload Benchmark
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: bench-current name: bench-current
path: bench.txt path: old.txt
benchstat: benchstat:
needs: [incoming, current] needs: [incoming, current]
@ -76,7 +74,7 @@ jobs:
with: with:
name: bench-current name: bench-current
- name: Benchstat Results - name: Benchstat Results
run: benchstat bench-current/bench.txt bench-incoming/bench.txt | tee -a benchstat.txt run: benchstat old.txt new.txt | tee -a benchstat.txt
- name: Upload benchstat results - name: Upload benchstat results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with: