2
// Copyright 2015, Google Inc.
3
// All rights reserved.
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are
9
// * Redistributions of source code must retain the above copyright
10
// notice, this list of conditions and the following disclaimer.
11
// * Redistributions in binary form must reproduce the above
12
// copyright notice, this list of conditions and the following disclaimer
13
// in the documentation and/or other materials provided with the
15
// * Neither the name of Google Inc. nor the names of its
16
// contributors may be used to endorse or promote products derived from
17
// this software without specific prior written permission.
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
// An integration test service that covers all the method signature permutations
32
// of unary/streaming requests/responses.
38
// Compressable text format.
41
// Uncompressable binary format.
44
// Randomly chosen from all other formats defined in this enum.
48
message StatsRequest {
55
double time_elapsed = 1;
57
// user time used by the server process and threads
60
// server time used by the server process and all threads
61
double time_system = 3;
65
// The type of data in body.
67
// Primary contents of payload.
71
message HistogramData {
72
repeated uint32 bucket = 1;
76
double sum_of_squares = 5;
81
SYNCHRONOUS_CLIENT = 0;
86
SYNCHRONOUS_SERVER = 0;
103
message PoissonParams {
104
double offered_load = 1;
107
message UniformParams {
108
double interarrival_lo = 1;
109
double interarrival_hi = 2;
112
message DeterministicParams {
113
double offered_load = 1;
116
message ParetoParams {
117
double interarrival_base = 1;
123
PoissonParams poisson = 1;
124
UniformParams uniform = 2;
125
DeterministicParams determ = 3;
126
ParetoParams pareto = 4;
130
message ClientConfig {
131
repeated string server_targets = 1;
132
ClientType client_type = 2;
134
int32 outstanding_rpcs_per_channel = 4;
135
int32 client_channels = 5;
136
int32 payload_size = 6;
137
// only for async client:
138
int32 async_client_threads = 7;
139
RpcType rpc_type = 8;
141
LoadType load_type = 10;
142
LoadParams load_params = 11;
145
// Request current stats
151
ClientConfig setup = 1;
156
message ClientStats {
157
HistogramData latencies = 1;
158
double time_elapsed = 2;
159
double time_user = 3;
160
double time_system = 4;
163
message ClientStatus {
164
ClientStats stats = 1;
167
message ServerConfig {
168
ServerType server_type = 1;
176
ServerConfig setup = 1;
181
message ServerStatus {
182
ServerStats stats = 1;
186
message SimpleRequest {
187
// Desired payload type in the response from the server.
188
// If response_type is RANDOM, server randomly chooses one from other formats.
189
PayloadType response_type = 1;
191
// Desired payload size in the response from the server.
192
// If response_type is COMPRESSABLE, this denotes the size before compression.
193
int32 response_size = 2;
195
// Optional input payload sent along with the request.
199
message SimpleResponse {
203
service TestService {
204
// One request followed by one response.
205
// The server returns the client payload as-is.
206
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
208
// One request followed by one response.
209
// The server returns the client payload as-is.
210
rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse);
214
// Start test with specified workload
215
rpc RunTest(stream ClientArgs) returns (stream ClientStatus);
216
// Start test with specified workload
217
rpc RunServer(stream ServerArgs) returns (stream ServerStatus);