diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-05-04 10:47:14 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-05-04 11:31:27 +0200 |
commit | bdfd93dce9c2cc2adbef7d5b6549fffe95108855 (patch) | |
tree | 97154ded0074c1f25f8534338f000cf8529c2c20 /client | |
parent | f4442c9332f73e21be58cc538fca9851120b7553 (diff) |
Increase body size
Diffstat (limited to 'client')
-rw-r--r-- | client/go/internal/vespa/document/http_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/go/internal/vespa/document/http_test.go b/client/go/internal/vespa/document/http_test.go index 7e858f96020..489460b3ed7 100644 --- a/client/go/internal/vespa/document/http_test.go +++ b/client/go/internal/vespa/document/http_test.go @@ -275,6 +275,7 @@ func TestClientMethodAndURL(t *testing.T) { } func benchmarkClientSend(b *testing.B, compression Compression, document Document) { + b.Helper() httpClient := mock.HTTPClient{} client, _ := NewClient(ClientOptions{ Compression: compression, @@ -293,6 +294,7 @@ func BenchmarkClientSend(b *testing.B) { } func BenchmarkClientSendCompressed(b *testing.B) { - doc := Document{Create: true, Id: mustParseId("id:ns:type::doc1"), Operation: OperationUpdate, Body: []byte(`{"fields":{"foo": "my document"}}`)} + body := fmt.Sprintf(`{"fields":{"foo": "%s"}}`, strings.Repeat("my document", 100)) + doc := Document{Create: true, Id: mustParseId("id:ns:type::doc1"), Operation: OperationUpdate, Body: []byte(body)} benchmarkClientSend(b, CompressionGzip, doc) } |