From b6a930aea478fbce9d2595476b0fdf8c165f665b Mon Sep 17 00:00:00 2001 From: yangzhouhan Date: Tue, 2 Jun 2015 18:26:11 -0700 Subject: [PATCH] modified the comments and format --- benchmark/benchmark.go | 4 ++-- benchmark/benchmark_test.go | 2 +- benchmark/client/main.go | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/benchmark/benchmark.go b/benchmark/benchmark.go index 83d5f5bd..f7b80633 100644 --- a/benchmark/benchmark.go +++ b/benchmark/benchmark.go @@ -129,10 +129,10 @@ func DoStreamingRoundTrip(tc testpb.TestServiceClient, stream testpb.TestService Payload: pl, } if err := stream.Send(req); err != nil { - grpclog.Fatalf("%v.StreamingCall(_)=_, %v: ", tc, err) + grpclog.Fatalf("%v.StreamingCall(_) = _, %v: ", tc, err) } if _, err := stream.Recv(); err != nil { - grpclog.Fatal("%v.StreamingCall(_)=_, %v: ", tc, err) + grpclog.Fatal("%v.StreamingCall(_) = _, %v: ", tc, err) } } diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index 76e99688..f5bc32f4 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -64,7 +64,7 @@ func runStream(b *testing.B, maxConcurrentCalls int) { tc := testpb.NewTestServiceClient(conn) stream, err := tc.StreamingCall(context.Background()) if err != nil { - grpclog.Fatalf("%v.StreamingCall(_)=_,%v: ", tc, err) + grpclog.Fatalf("%v.StreamingCall(_) = _,%v: ", tc, err) } // Warm up connection. for i := 0; i < 10; i++ { diff --git a/benchmark/client/main.go b/benchmark/client/main.go index fdb32233..55ffea19 100644 --- a/benchmark/client/main.go +++ b/benchmark/client/main.go @@ -21,7 +21,10 @@ var ( server = flag.String("server", "", "The server address") maxConcurrentRPCs = flag.Int("max_concurrent_rpcs", 1, "The max number of concurrent RPCs") duration = flag.Int("duration", math.MaxInt32, "The duration in seconds to run the benchmark client") - rpcType = flag.Int("rpc_type", 0, "client rpc type") + rpcType = flag.Int("rpc_type", 0, + `Configure different client rpc type. Valid options are: + 0 : unary call; + 1 : streaming call.`) ) func unaryCaller(client testpb.TestServiceClient) { @@ -91,7 +94,7 @@ func closeLoopStream() { s, conn, tc := buildConnection() stream, err := tc.StreamingCall(context.Background()) if err != nil { - grpclog.Fatalf("%v.StreamingCall(_)=_,%v: ", tc, err) + grpclog.Fatalf("%v.StreamingCall(_) = _,%v: ", tc, err) } for i := 0; i < 100; i++ { streamCaller(tc, stream)