:Merge branch 'qps' of github.com:ctiller/grpc into qps

pull/1240/head
Craig Tiller 10 years ago
commit c908eb65df
  1. 2
      test/cpp/qps/client_async.cc
  2. 6
      test/cpp/qps/server_async.cc

@ -310,7 +310,7 @@ class AsyncStreamingClient GRPC_FINAL : public Client {
bool ThreadFunc(Histogram *histogram, size_t thread_idx) GRPC_OVERRIDE { bool ThreadFunc(Histogram *histogram, size_t thread_idx) GRPC_OVERRIDE {
void *got_tag; void *got_tag;
bool ok; bool ok;
switch (cli_cqs_[thread_idx]->AsyncNext(&got_tag, &ok, std::chrono::system_clock::now() + std::chrono::seconds(11))) { switch (cli_cqs_[thread_idx]->AsyncNext(&got_tag, &ok, std::chrono::system_clock::now() + std::chrono::seconds(1))) {
case CompletionQueue::SHUTDOWN: return false; case CompletionQueue::SHUTDOWN: return false;
case CompletionQueue::TIMEOUT: return true; case CompletionQueue::TIMEOUT: return true;
case CompletionQueue::GOT_EVENT: break; case CompletionQueue::GOT_EVENT: break;

@ -175,8 +175,9 @@ class AsyncQpsServerTest : public Server {
private: private:
bool finisher(bool) { return false; } bool finisher(bool) { return false; }
bool invoker(bool ok) { bool invoker(bool ok) {
if (!ok) if (!ok) {
return false; return false;
}
ResponseType response; ResponseType response;
@ -230,8 +231,9 @@ class AsyncQpsServerTest : public Server {
private: private:
bool request_done(bool ok) { bool request_done(bool ok) {
if (!ok) if (!ok) {
return false; return false;
}
stream_.Read(&req_, AsyncQpsServerTest::tag(this)); stream_.Read(&req_, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::read_done; next_state_ = &ServerRpcContextStreamingImpl::read_done;
return true; return true;

Loading…
Cancel
Save