File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,7 @@ go test --run=^$ --bench=. --benchmem --memprofile ci/out/prof.mem --cpuprofile
6
6
(
7
7
cd ./internal/thirdparty
8
8
go test --run=^$ --bench=. --benchmem --memprofile ../../ci/out/prof-thirdparty.mem --cpuprofile ../../ci/out/prof-thirdparty.cpu -o ../../ci/out/thirdparty.test " $@ " .
9
+
10
+ GOARCH=arm64 go test -c -o ../../ci/out/thirdparty-arm64.test .
11
+ 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 .
9
12
)
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package thirdparty
2
2
3
3
import (
4
4
"encoding/binary"
5
+ "runtime"
5
6
"strconv"
6
7
"testing"
7
8
_ "unsafe"
@@ -34,6 +35,10 @@ func nbioMaskBytes(b, key []byte) int
34
35
func gorillaMaskBytes (key [4 ]byte , pos int , b []byte ) int
35
36
36
37
func Benchmark_mask (b * testing.B ) {
38
+ b .Run (runtime .GOARCH , benchmark_mask )
39
+ }
40
+
41
+ func benchmark_mask (b * testing.B ) {
37
42
sizes := []int {
38
43
8 ,
39
44
16 ,
You can’t perform that action at this time.
0 commit comments