Skip to content

Commit 80498a2

Browse files
committed
make: add ab perf tests
Added a new target to run ab tests for comparing performance between current changes and master. Follows up #122
1 parent 6c411b6 commit 80498a2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ coveralls: coverage
3030
bench:
3131
go clean -testcache
3232
go test -bench=. -benchmem -benchtime=1s
33+
34+
.PHONY: ab-perf
35+
ab-perf:
36+
export TNT_CUR_BRANCH=$(git branch --show-current)
37+
go clean -testcache
38+
go test -bench=. -benchmem -benchtime=1s > b.txt
39+
git stash && git fetch && git checkout master
40+
go clean -testcache
41+
go test -bench=. -benchmem -benchtime=1s > a.txt
42+
go get golang.org/x/tools/cmd/benchcmp
43+
benchcmp a.txt b.txt
44+
echo ${TNT_CUR_BRANCH}
45+
git checkout ${TNT_CUR_BRANCH}
46+
git stash pop
47+
unset TNT_CUR_BRANCH

0 commit comments

Comments
 (0)