diff options
author | Andrew Gerrand <adg@golang.org> | 2016-05-31 13:21:35 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2016-05-31 05:40:37 +0000 |
commit | 87ee12cece96ec5837fe89c37899d725e7e852d9 (patch) | |
tree | 34fc389f47e92b5ccb64e77851450220f770094c | |
parent | 8e6e9e83818596048cfca1e121ad39b9b007ba28 (diff) | |
download | go-87ee12cece96ec5837fe89c37899d725e7e852d9.tar.gz go-87ee12cece96ec5837fe89c37899d725e7e852d9.zip |
crypto/tls: reduce size of buffer in throughput benchmarks
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>
-rw-r--r-- | src/crypto/tls/tls_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/tls/tls_test.go b/src/crypto/tls/tls_test.go index 894d7e82ab..47f02beeda 100644 --- a/src/crypto/tls/tls_test.go +++ b/src/crypto/tls/tls_test.go @@ -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) |