Skip to content

Commit

Permalink
benchmark: wire in new gzip compressor (#7486)
Browse files Browse the repository at this point in the history
  • Loading branch information
PapaCharlie authored Aug 13, 2024
1 parent ced812e commit 1008562
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions benchmark/benchmain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1008562

Please sign in to comment.