Skip to content

Commit e25d968

Browse files
committed
ci/bench.sh: Don't profile by default
1 parent d34e5d4 commit e25d968

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

ci/bench.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22
set -eu
33
cd -- "$(dirname "$0")/.."
44

5-
go test --run=^$ --bench=. --benchmem --memprofile ci/out/prof.mem --cpuprofile ci/out/prof.cpu -o ci/out/websocket.test "$@" .
5+
go test --run=^$ --bench=. --benchmem "$@" ./...
6+
# For profiling add: --memprofile ci/out/prof.mem --cpuprofile ci/out/prof.cpu -o ci/out/websocket.test
67
(
78
cd ./internal/thirdparty
8-
go test --run=^$ --bench=. --benchmem --memprofile ../../ci/out/prof-thirdparty.mem --cpuprofile ../../ci/out/prof-thirdparty.cpu -o ../../ci/out/thirdparty.test "$@" .
9+
go test --run=^$ --bench=. --benchmem "$@" .
910

10-
GOARCH=arm64 go test -c -o ../../ci/out/thirdparty-arm64.test .
11-
if [ "${CI-}" ]; then
12-
sudo apt-get update
13-
sudo apt-get install -y qemu-user-static
14-
alias qemu-aarch64=qemu-aarch64-static
11+
GOARCH=arm64 go test -c -o ../../ci/out/thirdparty-arm64.test "$@" .
12+
if [ "$#" -eq 0 ]; then
13+
if [ "${CI-}" ]; then
14+
sudo apt-get update
15+
sudo apt-get install -y qemu-user-static
16+
alias qemu-aarch64=qemu-aarch64-static
17+
fi
18+
qemu-aarch64 ../../ci/out/thirdparty-arm64.test --test.run=^$ --test.bench=Benchmark_mask --test.benchmem
1519
fi
16-
qemu-aarch64 ../../ci/out/thirdparty-arm64.test --test.run=^$ --test.bench=Benchmark_mask --test.benchmem --test.memprofile ../../ci/out/prof-thirdparty-arm64.mem --test.cpuprofile ../../ci/out/prof-thirdparty-arm64.cpu .
1720
)

0 commit comments

Comments
 (0)