diff options
author | 2017-02-08 14:29:30 -0800 | |
---|---|---|
committer | 2017-02-09 11:22:49 -0800 | |
commit | f797c651609c4a99b13ad8b0c3bf2b82eb189b15 (patch) | |
tree | 9dfe39073803ce29bc8057ef20ef3cff344883a0 | |
parent | d1c2866968b63e82ebeb47607d460ea869ca0ecc (diff) |
make the change in scenario config rather than c#
-rw-r--r-- | src/csharp/Grpc.IntegrationTesting/ServerRunners.cs | 3 | ||||
-rw-r--r-- | src/proto/grpc/testing/control.proto | 5 | ||||
-rw-r--r-- | tools/run_tests/performance/scenario_config.py | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs b/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs index 4591b72cba..8689d188ae 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs @@ -79,7 +79,8 @@ namespace Grpc.IntegrationTesting ServerServiceDefinition service = null; if (config.ServerType == ServerType.AsyncServer) { - Logger.Warning("ServerConfig.PayloadConfig is not supported for C# ServerType.AsyncServer. Ignoring the value"); + GrpcPreconditions.CheckArgument(config.PayloadConfig == null, + "ServerConfig.PayloadConfig shouldn't be set for BenchmarkService based server."); service = BenchmarkService.BindService(new BenchmarkServiceImpl()); } else if (config.ServerType == ServerType.AsyncGenericServer) diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 529313cfb1..8f0d25c2c9 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -139,7 +139,10 @@ message ServerConfig { int32 async_server_threads = 7; // Specify the number of cores to limit server to, if desired int32 core_limit = 8; - // payload config, used in generic server + // payload config, used in generic server. + // Note this must NOT be used in proto (non-generic) servers. For proto servers, + // 'response sizes' must be configured from the 'response_size' field of the + // 'SimpleRequest' objects in RPC requests. PayloadConfig payload_config = 9; // Specify the cores we should run the server on, if desired diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 6d138186ce..865125fcd7 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -143,8 +143,9 @@ def _ping_pong_scenario(name, rpc_type, if use_generic_payload: if server_type != 'ASYNC_GENERIC_SERVER': raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.') + scenario['server_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size) + scenario['client_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size) - scenario['server_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size) if unconstrained_client: outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client] |