@@ -16,7 +16,7 @@ import (
1616
1717 pb_client "tests/chained-functions-serving/proto"
1818
19- ctrdlog "github.com/containerd/containerd/ log"
19+ ctrdlog "github.com/containerd/log"
2020 log "github.com/sirupsen/logrus"
2121 "google.golang.org/grpc"
2222
@@ -152,11 +152,11 @@ func main() {
152152}
153153
154154func SayHello (ctx context.Context , address string ) {
155- dialOptions := []grpc.DialOption {grpc .WithBlock (), grpc . WithTransportCredentials (insecure .NewCredentials ())}
155+ dialOptions := []grpc.DialOption {grpc .WithTransportCredentials (insecure .NewCredentials ())}
156156 if * withTracing {
157157 dialOptions = append (dialOptions , grpc .WithStatsHandler (otelgrpc .NewClientHandler ()))
158158 }
159- conn , err := grpc .Dial (address , dialOptions ... )
159+ conn , err := grpc .NewClient (address , dialOptions ... )
160160 if err != nil {
161161 log .Fatalf ("did not connect: %v" , err )
162162 }
@@ -175,7 +175,7 @@ func SayHello(ctx context.Context, address string) {
175175
176176func benchFanIn (ctx context.Context , prodAddr , consAddr string , fanInAmount int ) {
177177 log .Infof ("using fanIn ubench" )
178- dialOptions := []grpc.DialOption {grpc .WithBlock (), grpc . WithTransportCredentials (insecure .NewCredentials ())}
178+ dialOptions := []grpc.DialOption {grpc .WithTransportCredentials (insecure .NewCredentials ())}
179179 if * withTracing {
180180 dialOptions = append (dialOptions , grpc .WithStatsHandler (otelgrpc .NewClientHandler ()))
181181 }
@@ -186,7 +186,7 @@ func benchFanIn(ctx context.Context, prodAddr, consAddr string, fanInAmount int)
186186 errorChannel := make (chan error , fanInAmount )
187187 for i := 0 ; i < fanInAmount ; i ++ {
188188 go func () {
189- conn , err := grpc .Dial (prodAddr , dialOptions ... )
189+ conn , err := grpc .NewClient (prodAddr , dialOptions ... )
190190 if err != nil {
191191 log .Fatalf ("did not connect: %v" , err )
192192 }
@@ -219,11 +219,11 @@ func benchFanIn(ctx context.Context, prodAddr, consAddr string, fanInAmount int)
219219
220220func reduce (ctx context.Context , consEndpoint string , capabilities []string ) {
221221 log .Infof ("Attempting reduction using addr:%s" , consEndpoint )
222- dialOptions := []grpc.DialOption {grpc .WithBlock (), grpc . WithTransportCredentials (insecure .NewCredentials ())}
222+ dialOptions := []grpc.DialOption {grpc .WithTransportCredentials (insecure .NewCredentials ())}
223223 if * withTracing {
224224 dialOptions = append (dialOptions , grpc .WithStatsHandler (otelgrpc .NewClientHandler ()))
225225 }
226- conn , err := grpc .Dial (consEndpoint , dialOptions ... )
226+ conn , err := grpc .NewClient (consEndpoint , dialOptions ... )
227227 if err != nil {
228228 log .Fatalf ("did not connect: %v" , err )
229229 }
@@ -241,11 +241,11 @@ func reduce(ctx context.Context, consEndpoint string, capabilities []string) {
241241
242242func benchFanOut (ctx context.Context , prodAddr string , fanOutAmount int ) {
243243 log .Infof ("using fanOut ubench" )
244- dialOptions := []grpc.DialOption {grpc .WithBlock (), grpc . WithTransportCredentials (insecure .NewCredentials ())}
244+ dialOptions := []grpc.DialOption {grpc .WithTransportCredentials (insecure .NewCredentials ())}
245245 if * withTracing {
246246 dialOptions = append (dialOptions , grpc .WithStatsHandler (otelgrpc .NewClientHandler ()))
247247 }
248- conn , err := grpc .Dial (prodAddr , dialOptions ... )
248+ conn , err := grpc .NewClient (prodAddr , dialOptions ... )
249249 if err != nil {
250250 log .Fatalf ("did not connect: %v" , err )
251251 }
@@ -264,11 +264,11 @@ func benchFanOut(ctx context.Context, prodAddr string, fanOutAmount int) {
264264
265265func benchBroadcast (ctx context.Context , prodAddr string , broadcast int ) {
266266 log .Infof ("using broadcast ubench" )
267- dialOptions := []grpc.DialOption {grpc .WithBlock (), grpc . WithTransportCredentials (insecure .NewCredentials ())}
267+ dialOptions := []grpc.DialOption {grpc .WithTransportCredentials (insecure .NewCredentials ())}
268268 if * withTracing {
269269 dialOptions = append (dialOptions , grpc .WithStatsHandler (otelgrpc .NewClientHandler ()))
270270 }
271- conn , err := grpc .Dial (prodAddr , dialOptions ... )
271+ conn , err := grpc .NewClient (prodAddr , dialOptions ... )
272272 if err != nil {
273273 log .Fatalf ("did not connect: %v" , err )
274274 }
0 commit comments