aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.IntegrationTesting/Client.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.IntegrationTesting/Client.cs')
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Client.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/Client.cs b/src/csharp/Grpc.IntegrationTesting/Client.cs
index bb650a112d..0c70744cea 100644
--- a/src/csharp/Grpc.IntegrationTesting/Client.cs
+++ b/src/csharp/Grpc.IntegrationTesting/Client.cs
@@ -33,7 +33,9 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Text.RegularExpressions;
+using System.Threading.Tasks;
using Google.ProtocolBuffers;
using Grpc.Core;
using Grpc.Core.Utils;
@@ -128,6 +130,9 @@ namespace Grpc.IntegrationTesting
case "empty_stream":
RunEmptyStream(client);
break;
+ case "benchmark_empty_unary":
+ RunBenchmarkEmptyUnary(client);
+ break;
default:
throw new ArgumentException("Unknown test case " + testCase);
}
@@ -267,6 +272,12 @@ namespace Grpc.IntegrationTesting
Console.WriteLine("Passed!");
}
+ // This is not an official interop test, but it's useful.
+ private void RunBenchmarkEmptyUnary(TestServiceGrpc.ITestServiceClient client)
+ {
+ BenchmarkUtil.RunBenchmark(10000, 10000,
+ () => { client.EmptyCall(Empty.DefaultInstance);});
+ }
private Payload CreateZerosPayload(int size) {
return Payload.CreateBuilder().SetBody(ByteString.CopyFrom(new byte[size])).Build();