aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qpstest.proto
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-03-23 10:10:27 -0700
committerGravatar vjpai <vpai@google.com>2015-03-23 10:10:27 -0700
commit46f65239cf5bb55c106558196b9f293188746ef7 (patch)
treedb6a554d6358196eb54a43a187f316c84b15a978 /test/cpp/qps/qpstest.proto
parent99f1c1ee7efcceae76bf3dce17417ce5dc0ca0d7 (diff)
Added streaming C++ tests for sync and sync cases
Diffstat (limited to 'test/cpp/qps/qpstest.proto')
-rw-r--r--test/cpp/qps/qpstest.proto78
1 files changed, 13 insertions, 65 deletions
diff --git a/test/cpp/qps/qpstest.proto b/test/cpp/qps/qpstest.proto
index 6a7170bf58..70cc926f16 100644
--- a/test/cpp/qps/qpstest.proto
+++ b/test/cpp/qps/qpstest.proto
@@ -87,15 +87,21 @@ enum ServerType {
ASYNC_SERVER = 2;
}
+enum TestType {
+ UNARY_TEST = 1;
+ STREAMING_TEST = 2;
+}
+
message ClientConfig {
repeated string server_targets = 1;
required ClientType client_type = 2;
- required bool enable_ssl = 3;
+ optional bool enable_ssl = 3 [default=false];
required int32 outstanding_rpcs_per_channel = 4;
required int32 client_channels = 5;
required int32 payload_size = 6;
// only for async client:
optional int32 async_client_threads = 7;
+ optional TestType test_type = 8 [default=UNARY_TEST];
}
// Request current stats
@@ -121,8 +127,8 @@ message ClientStatus {
message ServerConfig {
required ServerType server_type = 1;
- required int32 threads = 2;
- required bool enable_ssl = 3;
+ optional int32 threads = 2 [default=1];
+ optional bool enable_ssl = 3 [default=false];
}
message ServerArgs {
@@ -144,7 +150,7 @@ message SimpleRequest {
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
- optional int32 response_size = 2;
+ optional int32 response_size = 2 [default=0];
// Optional input payload sent along with the request.
optional Payload payload = 3;
@@ -154,72 +160,14 @@ message SimpleResponse {
optional Payload payload = 1;
}
-message StreamingInputCallRequest {
- // Optional input payload sent along with the request.
- optional Payload payload = 1;
-
- // Not expecting any payload from the response.
-}
-
-message StreamingInputCallResponse {
- // Aggregated size of payloads received from the client.
- optional int32 aggregated_payload_size = 1;
-}
-
-message ResponseParameters {
- // Desired payload sizes in responses from the server.
- // If response_type is COMPRESSABLE, this denotes the size before compression.
- required int32 size = 1;
-
- // Desired interval between consecutive responses in the response stream in
- // microseconds.
- required int32 interval_us = 2;
-}
-
-message StreamingOutputCallRequest {
- // Desired payload type in the response from the server.
- // If response_type is RANDOM, the payload from each response in the stream
- // might be of different types. This is to simulate a mixed type of payload
- // stream.
- optional PayloadType response_type = 1 [default=COMPRESSABLE];
-
- repeated ResponseParameters response_parameters = 2;
-
- // Optional input payload sent along with the request.
- optional Payload payload = 3;
-}
-
-message StreamingOutputCallResponse {
- optional Payload payload = 1;
-}
-
service TestService {
// One request followed by one response.
// The server returns the client payload as-is.
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
- // One request followed by a sequence of responses (streamed download).
- // The server returns the payload with client desired type and sizes.
- rpc StreamingOutputCall(StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by one response (streamed upload).
- // The server returns the aggregated size of client payload as the result.
- rpc StreamingInputCall(stream StreamingInputCallRequest)
- returns (StreamingInputCallResponse);
-
- // A sequence of requests with each request served by the server immediately.
- // As one request could lead to multiple responses, this interface
- // demonstrates the idea of full duplexing.
- rpc FullDuplexCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by a sequence of responses.
- // The server buffers all the client requests and then serves them in order. A
- // stream of responses are returned to the client when the server starts with
- // first request.
- rpc HalfDuplexCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
+ // One request followed by one response.
+ // The server returns the client payload as-is.
+ rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse);
}
service Worker {