aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-03-29 08:29:32 -0700
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-03-29 08:29:32 -0700
commitd2eb23974d62e7d6f2ed6486ba559e36f16b8081 (patch)
tree71d96eab212c4653b14d1e5114c72cee422db181 /src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs
parentc91504ed57c93d30f654d9f3a0fee62c1236fad8 (diff)
parent42140525abdcd0186996d7b64bde89aaf10488c7 (diff)
Merge pull request #5904 from jtattermusch/csharp_perf_intergrate
C# performance worker improvements
Diffstat (limited to 'src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs')
-rw-r--r--src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs
index 47a15224f1..1edeedae2f 100644
--- a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs
+++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs
@@ -1,6 +1,6 @@
#region Copyright notice and license
-// Copyright 2015, Google Inc.
+// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -46,16 +46,13 @@ namespace Grpc.Testing
/// </summary>
public class BenchmarkServiceImpl : BenchmarkService.IBenchmarkService
{
- private readonly int responseSize;
-
- public BenchmarkServiceImpl(int responseSize)
+ public BenchmarkServiceImpl()
{
- this.responseSize = responseSize;
}
public Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context)
{
- var response = new SimpleResponse { Payload = CreateZerosPayload(responseSize) };
+ var response = new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) };
return Task.FromResult(response);
}
@@ -63,7 +60,7 @@ namespace Grpc.Testing
{
await requestStream.ForEachAsync(async request =>
{
- var response = new SimpleResponse { Payload = CreateZerosPayload(responseSize) };
+ var response = new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) };
await responseStream.WriteAsync(response);
});
}