Skip to content

Commit 1008562

Browse files
authored
benchmark: wire in new gzip compressor (grpc#7486)
1 parent ced812e commit 1008562

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

benchmark/benchmain/main.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import (
6565
"google.golang.org/grpc/benchmark/latency"
6666
"google.golang.org/grpc/benchmark/stats"
6767
"google.golang.org/grpc/credentials/insecure"
68+
"google.golang.org/grpc/encoding/gzip"
6869
"google.golang.org/grpc/experimental"
6970
"google.golang.org/grpc/grpclog"
7071
"google.golang.org/grpc/internal"
@@ -301,13 +302,8 @@ func makeClients(bf stats.Features) ([]testgrpc.BenchmarkServiceClient, func())
301302
)
302303
}
303304
if bf.ModeCompressor == compModeGzip {
304-
sopts = append(sopts,
305-
grpc.RPCCompressor(grpc.NewGZIPCompressor()),
306-
grpc.RPCDecompressor(grpc.NewGZIPDecompressor()),
307-
)
308305
opts = append(opts,
309-
grpc.WithCompressor(grpc.NewGZIPCompressor()),
310-
grpc.WithDecompressor(grpc.NewGZIPDecompressor()),
306+
grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)),
311307
)
312308
}
313309
if bf.EnableKeepalive {

0 commit comments

Comments
 (0)