Debian Codegraph @

ci/bench.sh

raw
1 #!/bin/sh
2 set -eu
3 cd -- "$(dirname "$0")/.."
4
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
7 (
8 cd ./internal/thirdparty
9 go test --run=^$ --bench=. --benchmem "$@" .
10
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 ln -s /usr/bin/qemu-aarch64-static /usr/local/bin/qemu-aarch64
17 fi
18 qemu-aarch64 ../../ci/out/thirdparty-arm64.test --test.run=^$ --test.bench=Benchmark_mask --test.benchmem
19 fi
20 )