Skip to content

Commit

Permalink
crypto/tls: reduce size of buffer in throughput benchmarks
Browse files Browse the repository at this point in the history
The Windows builders run the throughput benchmarks really slowly with a
64kb buffer. Lowering it to 16kb brings the performance back into line
with the other builders.

This is a work-around to get the build green until we can figure out why
the Windows builders are slow with the larger buffer size.

Update golang#15899

Change-Id: I215ebf115e8295295c87f3b3e22a4ef1f9e77f81
Reviewed-on: https://go-review.googlesource.com/23574
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
adg committed May 31, 2016
1 parent 8e6e9e8 commit 87ee12c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/tls/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func throughput(b *testing.B, totalBytes int64, dynamicRecordSizingDisabled bool
clientConfig := *testConfig
clientConfig.DynamicRecordSizingDisabled = dynamicRecordSizingDisabled

buf := make([]byte, 1<<16)
buf := make([]byte, 1<<14)
chunks := int(math.Ceil(float64(totalBytes) / float64(len(buf))))
for i := 0; i < N; i++ {
conn, err := Dial("tcp", ln.Addr().String(), &clientConfig)
Expand Down

0 comments on commit 87ee12c

Please sign in to comment.