Skip to content

Commit

Permalink
Merge pull request grpc#10313 from vjpai/onesided
Browse files Browse the repository at this point in the history
Add QPS tests for 1-sided unconstrained streaming
  • Loading branch information
vjpai authored May 5, 2017
2 parents 6815e41 + eea8cf0 commit ea4adc1
Show file tree
Hide file tree
Showing 10 changed files with 1,912 additions and 228 deletions.
3 changes: 3 additions & 0 deletions src/proto/grpc/testing/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ enum ServerType {
enum RpcType {
UNARY = 0;
STREAMING = 1;
STREAMING_FROM_CLIENT = 2;
STREAMING_FROM_SERVER = 3;
STREAMING_BOTH_WAYS = 4;
}

// Parameters of poisson process distribution, which is a good representation
Expand Down
17 changes: 15 additions & 2 deletions src/proto/grpc/testing/services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,22 @@ service BenchmarkService {
// The server returns the client payload as-is.
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);

// One request followed by one response.
// The server returns the client payload as-is.
// Repeated sequence of one request followed by one response.
// Should be called streaming ping-pong
// The server returns the client payload as-is on each response
rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse);

// Single-sided unbounded streaming from client to server
// The server returns the client payload as-is once the client does WritesDone
rpc StreamingFromClient(stream SimpleRequest) returns (SimpleResponse);

// Single-sided unbounded streaming from server to client
// The server repeatedly returns the client payload as-is
rpc StreamingFromServer(SimpleRequest) returns (stream SimpleResponse);

// Two-sided unbounded streaming between server to client
// Both sides send the content of their own choice to the other
rpc StreamingBothWays(stream SimpleRequest) returns (stream SimpleResponse);
}

service WorkerService {
Expand Down
7 changes: 2 additions & 5 deletions test/cpp/qps/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,8 @@ class ClientImpl : public Client {
create_stub_;
};

std::unique_ptr<Client> CreateSynchronousUnaryClient(const ClientConfig& args);
std::unique_ptr<Client> CreateSynchronousStreamingClient(
const ClientConfig& args);
std::unique_ptr<Client> CreateAsyncUnaryClient(const ClientConfig& args);
std::unique_ptr<Client> CreateAsyncStreamingClient(const ClientConfig& args);
std::unique_ptr<Client> CreateSynchronousClient(const ClientConfig& args);
std::unique_ptr<Client> CreateAsyncClient(const ClientConfig& args);
std::unique_ptr<Client> CreateGenericAsyncStreamingClient(
const ClientConfig& args);

Expand Down
Loading

0 comments on commit ea4adc1

Please sign in to comment.