benchmark: wire in new gzip compressor (#7486)

This commit is contained in:
Paul Chesnais 2024-08-13 17:19:45 -04:00 committed by GitHub
parent ced812e328
commit 10085621a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -65,6 +65,7 @@ import (
"google.golang.org/grpc/benchmark/latency"
"google.golang.org/grpc/benchmark/stats"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/encoding/gzip"
"google.golang.org/grpc/experimental"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal"
@ -301,13 +302,8 @@ func makeClients(bf stats.Features) ([]testgrpc.BenchmarkServiceClient, func())
)
}
if bf.ModeCompressor == compModeGzip {
sopts = append(sopts,
grpc.RPCCompressor(grpc.NewGZIPCompressor()),
grpc.RPCDecompressor(grpc.NewGZIPDecompressor()),
)
opts = append(opts,
grpc.WithCompressor(grpc.NewGZIPCompressor()),
grpc.WithDecompressor(grpc.NewGZIPDecompressor()),
grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)),
)
}
if bf.EnableKeepalive {