From daaae5f3b49ecf4018f31767bdad8fe324222934 Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Fri, 28 Aug 2020 12:48:41 -0700 Subject: [PATCH] csharp xds test client: decrease log output --- .../Grpc.IntegrationTesting/XdsInteropClient.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/XdsInteropClient.cs b/src/csharp/Grpc.IntegrationTesting/XdsInteropClient.cs index 0ad6c4bc920..f30f5b8fe4a 100644 --- a/src/csharp/Grpc.IntegrationTesting/XdsInteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/XdsInteropClient.cs @@ -152,8 +152,6 @@ namespace Grpc.IntegrationTesting // only cleanup calls that have already completed, calls that are still inflight will be cleaned up later. await CleanupCompletedTasksAsync(inflightTasks); - Console.WriteLine($"Currently {inflightTasks.Count} in-flight RPCs"); - // if needed, wait a bit before we start the next RPC. int nextDueInMillis = (int) Math.Max(0, (1000 * rpcsStarted / options.Qps / rpcs.Count) - stopwatch.ElapsedMilliseconds); if (nextDueInMillis > 0) @@ -173,8 +171,6 @@ namespace Grpc.IntegrationTesting long rpcId = statsWatcher.RpcIdGenerator.Increment(); try { - Console.WriteLine($"Starting RPC {rpcId} of type {rpcType}"); - // metadata to send with the RPC var headers = new Metadata(); if (metadata.ContainsKey(rpcType)) @@ -183,7 +179,6 @@ namespace Grpc.IntegrationTesting if (headers.Count > 0) { var printableHeaders = "[" + string.Join(", ", headers) + "]"; - Console.WriteLine($"Will send metadata {printableHeaders}"); } } @@ -218,12 +213,14 @@ namespace Grpc.IntegrationTesting { throw new InvalidOperationException($"Unsupported RPC type ${rpcType}"); } - Console.WriteLine($"RPC {rpcId} succeeded"); } catch (RpcException ex) { statsWatcher.OnRpcComplete(rpcId, rpcType, null); - Console.WriteLine($"RPC {rpcId} failed: {ex}"); + if (options.PrintResponse) + { + Console.WriteLine($"RPC {rpcId} failed: {ex}"); + } } }