mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Replace benchcmp with benchstat
This commit is contained in:
parent
3114987428
commit
82b6828f43
@ -5,9 +5,9 @@ git:
|
|||||||
go: [1.13.x, 1.14.x, 1.15.x]
|
go: [1.13.x, 1.14.x, 1.15.x]
|
||||||
script:
|
script:
|
||||||
- go test -race -v -coverprofile=coverage.txt -covermode=atomic ./...
|
- go test -race -v -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
- go test -run=XXX -bench=. -loglevel=debug ./...
|
- go test -run=^$ -bench=. -loglevel=debug ./...
|
||||||
services:
|
services:
|
||||||
- redis-server
|
- redis-server
|
||||||
after_success:
|
after_success:
|
||||||
- bash ./.travis/benchcmp.sh
|
- travis_wait 60 bash ./.travis/benchstat.sh
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
@ -2,17 +2,19 @@ if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ]; then
|
|||||||
REMOTE_URL="$(git config --get remote.origin.url)";
|
REMOTE_URL="$(git config --get remote.origin.url)";
|
||||||
cd ${TRAVIS_BUILD_DIR}/.. && \
|
cd ${TRAVIS_BUILD_DIR}/.. && \
|
||||||
git clone ${REMOTE_URL} "${TRAVIS_REPO_SLUG}-bench" && \
|
git clone ${REMOTE_URL} "${TRAVIS_REPO_SLUG}-bench" && \
|
||||||
|
# turn the detached message off
|
||||||
|
git config --global advice.detachedHead false && \
|
||||||
cd "${TRAVIS_REPO_SLUG}-bench" && \
|
cd "${TRAVIS_REPO_SLUG}-bench" && \
|
||||||
|
|
||||||
# Benchmark master
|
# Benchmark master
|
||||||
git checkout master && \
|
git checkout master && \
|
||||||
go test -run=XXX -bench=. ./... > master.txt && \
|
go test -run=^$ -bench=. -count=5 -timeout=60m -benchmem ./... > master.txt && \
|
||||||
|
|
||||||
# Benchmark feature branch
|
# Benchmark feature branch
|
||||||
git checkout ${TRAVIS_COMMIT} && \
|
git checkout ${TRAVIS_COMMIT} && \
|
||||||
go test -run=XXX -bench=. ./... > feature.txt && \
|
go test -run=^$ -bench=. -count=5 -timeout=60m -benchmem ./... > feature.txt && \
|
||||||
|
|
||||||
# compare two benchmarks
|
# compare two benchmarks
|
||||||
go get -u golang.org/x/tools/cmd/benchcmp && \
|
go get -u golang.org/x/perf/cmd/benchstat && \
|
||||||
benchcmp master.txt feature.txt;
|
benchstat master.txt feature.txt;
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user