Skip to content

Commit 1943020

Browse files
committed
Improve benchmark code
1 parent 0e8d46d commit 1943020

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

bench_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ func benchConn(b *testing.B, stream bool) {
8585
})
8686
}
8787

88-
// runN(32)
89-
// runN(128)
90-
// runN(512)
91-
// runN(1024)
88+
runN(32)
89+
runN(128)
90+
runN(512)
91+
runN(1024)
9292
runN(4096)
9393
runN(16384)
94-
// runN(65536)
95-
// runN(131072)
94+
runN(65536)
95+
runN(131072)
9696

9797
c.Close(websocket.StatusNormalClosure, "")
9898
})

ci/test/entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ source ci/lib.sh || exit 1
55
mkdir -p profs
66

77
set +x
8+
echo
89
echo "this step includes benchmarks for race detection and coverage purposes
910
but the numbers will be misleading. please see the bench step for more
1011
accurate numbers"
12+
echo
1113
set -x
1214

1315
go test -race -coverprofile=profs/coverage --vet=off -bench=. ./...

0 commit comments

Comments
 (0)