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

Update benchmark.sh to log at debug level

This commit is contained in:
Ken Hibino 2020-06-06 08:07:18 -07:00
parent 153a795903
commit 0ec4255691
2 changed files with 6 additions and 3 deletions

View File

@ -5,11 +5,11 @@ if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ]; then
cd "${TRAVIS_REPO_SLUG}-bench" && \
# Benchmark master
git checkout master && \
go test -run=XXX -bench=. ./... > master.txt && \
go test -run=XXX -bench=. -loglevel=debug ./... > master.txt && \
# Benchmark feature branch
git checkout ${TRAVIS_COMMIT} && \
go test -run=XXX -bench=. ./... > feature.txt && \
go test -run=XXX -bench=. -loglevel=debug ./... > feature.txt && \
go get -u golang.org/x/tools/cmd/benchcmp && \
# compare two benchmarks
benchcmp master.txt feature.txt;
fi
fi

View File

@ -29,6 +29,7 @@ func BenchmarkEndToEndSimple(b *testing.B) {
RetryDelayFunc: func(n int, err error, t *Task) time.Duration {
return time.Second
},
LogLevel: testLogLevel,
})
// Create a bunch of tasks
for i := 0; i < count; i++ {
@ -72,6 +73,7 @@ func BenchmarkEndToEnd(b *testing.B) {
RetryDelayFunc: func(n int, err error, t *Task) time.Duration {
return time.Second
},
LogLevel: testLogLevel,
})
// Create a bunch of tasks
for i := 0; i < count; i++ {
@ -131,6 +133,7 @@ func BenchmarkEndToEndMultipleQueues(b *testing.B) {
"default": 3,
"low": 1,
},
LogLevel: testLogLevel,
})
// Create a bunch of tasks
for i := 0; i < highCount; i++ {