mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-22 16:50:18 +08:00
Fix benchstat
This commit is contained in:
parent
bcc639d083
commit
5f99c4378f
20
.github/workflows/benchstat.yml
vendored
20
.github/workflows/benchstat.yml
vendored
@ -1,10 +1,8 @@
|
||||
# This workflow runs benchmarks against the current branch, compares them to benchmarks against
|
||||
# master, and uploads the results as an artifact.
|
||||
# This workflow runs benchmarks against the current branch,
|
||||
# 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
|
||||
# as a comment in the pull request.
|
||||
|
||||
name: Benchstat
|
||||
name: benchstat
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
@ -24,12 +22,12 @@ jobs:
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
- 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
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bench-incoming
|
||||
path: bench.txt
|
||||
path: new.txt
|
||||
|
||||
current:
|
||||
runs-on: ubuntu-latest
|
||||
@ -48,12 +46,12 @@ jobs:
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
- 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
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bench-current
|
||||
path: bench.txt
|
||||
path: old.txt
|
||||
|
||||
benchstat:
|
||||
needs: [incoming, current]
|
||||
@ -76,7 +74,7 @@ jobs:
|
||||
with:
|
||||
name: bench-current
|
||||
- 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
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
Loading…
x
Reference in New Issue
Block a user