Skip to content

Commit f25fcb0

Browse files
committed
ci/bench.sh: Install QEMU on CI
1 parent 2a7cf1b commit f25fcb0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ Advantages of nhooyr.io/websocket:
118118
- Gorilla requires registering a pong callback before sending a Ping
119119
- Can target Wasm ([gorilla/websocket#432](https://github.com/gorilla/websocket/issues/432))
120120
- Transparent message buffer reuse with [wsjson](https://pkg.go.dev/nhooyr.io/websocket/wsjson) subpackage
121-
- [3x](https://github.com/nhooyr/websocket/pull/326) faster WebSocket masking implementation in assembly for amd64 and arm64 and [2x](https://github.com/nhooyr/websocket/releases/tag/v1.7.4) faster implementation in pure Go
121+
- [4x](https://github.com/nhooyr/websocket/pull/326) faster WebSocket masking implementation in assembly for amd64 and arm64 and [2x](https://github.com/nhooyr/websocket/releases/tag/v1.7.4) faster implementation in pure Go
122122
- Gorilla's implementation is slower and uses [unsafe](https://golang.org/pkg/unsafe/).
123-
Soon we'll have assembly and be 3x faster [#326](https://github.com/nhooyr/websocket/pull/326)
124123
- Full [permessage-deflate](https://tools.ietf.org/html/rfc7692) compression extension support
125124
- Gorilla only supports no context takeover mode
126125
- [CloseRead](https://pkg.go.dev/nhooyr.io/websocket#Conn.CloseRead) helper for write only connections ([gorilla/websocket#492](https://github.com/gorilla/websocket/issues/492))

Diff for: ci/bench.sh

+5
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ go test --run=^$ --bench=. --benchmem --memprofile ci/out/prof.mem --cpuprofile
88
go test --run=^$ --bench=. --benchmem --memprofile ../../ci/out/prof-thirdparty.mem --cpuprofile ../../ci/out/prof-thirdparty.cpu -o ../../ci/out/thirdparty.test "$@" .
99

1010
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
15+
fi
1116
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 .
1217
)

0 commit comments

Comments
 (0)