]> Cypherpunks.ru repositories - gostls13.git/commitdiff
crypto/tls: reduce size of buffer in throughput benchmarks
authorAndrew Gerrand <adg@golang.org>
Tue, 31 May 2016 03:21:35 +0000 (13:21 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 31 May 2016 05:40:37 +0000 (05:40 +0000)
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 #15899

Change-Id: I215ebf115e8295295c87f3b3e22a4ef1f9e77f81
Reviewed-on: https://go-review.googlesource.com/23574
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/crypto/tls/tls_test.go

index 894d7e82ab75c4d2b9d96bd67317cd3b68dd61e1..47f02beedad25e19eec531e92dfc269de6c43825 100644 (file)
@@ -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)