LCOV - code coverage report
Current view: top level - gens/test/cpp/qps - qpstest.grpc.pb.cc (source / functions) Hit Total Coverage
Test: tmp.zDYK9MVh93 Lines: 49 70 70.0 %
Date: 2015-10-10 Functions: 17 28 60.7 %

          Line data    Source code
       1             : // Generated by the gRPC protobuf plugin.
       2             : // If you make any local change, they will be lost.
       3             : // source: test/cpp/qps/qpstest.proto
       4             : 
       5             : #include "test/cpp/qps/qpstest.pb.h"
       6             : #include "test/cpp/qps/qpstest.grpc.pb.h"
       7             : 
       8             : #include <grpc++/channel.h>
       9             : #include <grpc++/impl/client_unary_call.h>
      10             : #include <grpc++/impl/rpc_service_method.h>
      11             : #include <grpc++/impl/service_type.h>
      12             : #include <grpc++/support/async_unary_call.h>
      13             : #include <grpc++/support/async_stream.h>
      14             : #include <grpc++/support/sync_stream.h>
      15             : namespace grpc {
      16             : namespace testing {
      17             : 
      18             : static const char* TestService_method_names[] = {
      19             :   "/grpc.testing.TestService/UnaryCall",
      20             :   "/grpc.testing.TestService/StreamingCall",
      21             : };
      22             : 
      23          20 : std::unique_ptr< TestService::Stub> TestService::NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options) {
      24          20 :   std::unique_ptr< TestService::Stub> stub(new TestService::Stub(channel));
      25          20 :   return stub;
      26             : }
      27             : 
      28          20 : TestService::Stub::Stub(const std::shared_ptr< ::grpc::Channel>& channel)
      29             :   : channel_(channel), rpcmethod_UnaryCall_(TestService_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
      30          20 :   , rpcmethod_StreamingCall_(TestService_method_names[1], ::grpc::RpcMethod::BIDI_STREAMING, channel)
      31          20 :   {}
      32             : 
      33       58803 : ::grpc::Status TestService::Stub::UnaryCall(::grpc::ClientContext* context, const ::grpc::testing::SimpleRequest& request, ::grpc::testing::SimpleResponse* response) {
      34       58803 :   return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_UnaryCall_, context, request, response);
      35             : }
      36             : 
      37     1138127 : ::grpc::ClientAsyncResponseReader< ::grpc::testing::SimpleResponse>* TestService::Stub::AsyncUnaryCallRaw(::grpc::ClientContext* context, const ::grpc::testing::SimpleRequest& request, ::grpc::CompletionQueue* cq) {
      38     1138127 :   return new ::grpc::ClientAsyncResponseReader< ::grpc::testing::SimpleResponse>(channel_.get(), cq, rpcmethod_UnaryCall_, context, request);
      39             : }
      40             : 
      41           1 : ::grpc::ClientReaderWriter< ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>* TestService::Stub::StreamingCallRaw(::grpc::ClientContext* context) {
      42           1 :   return new ::grpc::ClientReaderWriter< ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>(channel_.get(), rpcmethod_StreamingCall_, context);
      43             : }
      44             : 
      45           1 : ::grpc::ClientAsyncReaderWriter< ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>* TestService::Stub::AsyncStreamingCallRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      46           1 :   return new ::grpc::ClientAsyncReaderWriter< ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>(channel_.get(), cq, rpcmethod_StreamingCall_, context, tag);
      47             : }
      48             : 
      49           4 : TestService::AsyncService::AsyncService() : ::grpc::AsynchronousService(TestService_method_names, 2) {}
      50             : 
      51           4 : TestService::Service::~Service() {
      52           2 :   delete service_;
      53           2 : }
      54             : 
      55           0 : ::grpc::Status TestService::Service::UnaryCall(::grpc::ServerContext* context, const ::grpc::testing::SimpleRequest* request, ::grpc::testing::SimpleResponse* response) {
      56             :   (void) context;
      57             :   (void) request;
      58             :   (void) response;
      59           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
      60             : }
      61             : 
      62     1180389 : void TestService::AsyncService::RequestUnaryCall(::grpc::ServerContext* context, ::grpc::testing::SimpleRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::SimpleResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      63     1180389 :   AsynchronousService::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
      64     1180493 : }
      65             : 
      66           0 : ::grpc::Status TestService::Service::StreamingCall(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::SimpleResponse, ::grpc::testing::SimpleRequest>* stream) {
      67             :   (void) context;
      68             :   (void) stream;
      69           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
      70             : }
      71             : 
      72       65058 : void TestService::AsyncService::RequestStreamingCall(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::testing::SimpleResponse, ::grpc::testing::SimpleRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      73       65058 :   AsynchronousService::RequestBidiStreaming(1, context, stream, new_call_cq, notification_cq, tag);
      74       65255 : }
      75             : 
      76           2 : ::grpc::RpcService* TestService::Service::service() {
      77           2 :   if (service_ != nullptr) {
      78           0 :     return service_;
      79             :   }
      80           2 :   service_ = new ::grpc::RpcService();
      81             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
      82             :       TestService_method_names[0],
      83             :       ::grpc::RpcMethod::NORMAL_RPC,
      84             :       new ::grpc::RpcMethodHandler< TestService::Service, ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>(
      85           2 :           std::mem_fn(&TestService::Service::UnaryCall), this)));
      86             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
      87             :       TestService_method_names[1],
      88             :       ::grpc::RpcMethod::BIDI_STREAMING,
      89             :       new ::grpc::BidiStreamingHandler< TestService::Service, ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse>(
      90           2 :           std::mem_fn(&TestService::Service::StreamingCall), this)));
      91           2 :   return service_;
      92             : }
      93             : 
      94             : 
      95             : static const char* Worker_method_names[] = {
      96             :   "/grpc.testing.Worker/RunTest",
      97             :   "/grpc.testing.Worker/RunServer",
      98             : };
      99             : 
     100          12 : std::unique_ptr< Worker::Stub> Worker::NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options) {
     101          12 :   std::unique_ptr< Worker::Stub> stub(new Worker::Stub(channel));
     102          12 :   return stub;
     103             : }
     104             : 
     105          12 : Worker::Stub::Stub(const std::shared_ptr< ::grpc::Channel>& channel)
     106             :   : channel_(channel), rpcmethod_RunTest_(Worker_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel)
     107          12 :   , rpcmethod_RunServer_(Worker_method_names[1], ::grpc::RpcMethod::BIDI_STREAMING, channel)
     108          12 :   {}
     109             : 
     110           6 : ::grpc::ClientReaderWriter< ::grpc::testing::ClientArgs, ::grpc::testing::ClientStatus>* Worker::Stub::RunTestRaw(::grpc::ClientContext* context) {
     111           6 :   return new ::grpc::ClientReaderWriter< ::grpc::testing::ClientArgs, ::grpc::testing::ClientStatus>(channel_.get(), rpcmethod_RunTest_, context);
     112             : }
     113             : 
     114           0 : ::grpc::ClientAsyncReaderWriter< ::grpc::testing::ClientArgs, ::grpc::testing::ClientStatus>* Worker::Stub::AsyncRunTestRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
     115           0 :   return new ::grpc::ClientAsyncReaderWriter< ::grpc::testing::ClientArgs, ::grpc::testing::ClientStatus>(channel_.get(), cq, rpcmethod_RunTest_, context, tag);
     116             : }
     117             : 
     118           6 : ::grpc::ClientReaderWriter< ::grpc::testing::ServerArgs, ::grpc::testing::ServerStatus>* Worker::Stub::RunServerRaw(::grpc::ClientContext* context) {
     119           6 :   return new ::grpc::ClientReaderWriter< ::grpc::testing::ServerArgs, ::grpc::testing::ServerStatus>(channel_.get(), rpcmethod_RunServer_, context);
     120             : }
     121             : 
     122           0 : ::grpc::ClientAsyncReaderWriter< ::grpc::testing::ServerArgs, ::grpc::testing::ServerStatus>* Worker::Stub::AsyncRunServerRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
     123           0 :   return new ::grpc::ClientAsyncReaderWriter< ::grpc::testing::ServerArgs, ::grpc::testing::ServerStatus>(channel_.get(), cq, rpcmethod_RunServer_, context, tag);
     124             : }
     125             : 
     126           0 : Worker::AsyncService::AsyncService() : ::grpc::AsynchronousService(Worker_method_names, 2) {}
     127             : 
     128          24 : Worker::Service::~Service() {
     129          12 :   delete service_;
     130          12 : }
     131             : 
     132           0 : ::grpc::Status Worker::Service::RunTest(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::ClientStatus, ::grpc::testing::ClientArgs>* stream) {
     133             :   (void) context;
     134             :   (void) stream;
     135           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     136             : }
     137             : 
     138           0 : void Worker::AsyncService::RequestRunTest(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::testing::ClientStatus, ::grpc::testing::ClientArgs>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     139           0 :   AsynchronousService::RequestBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
     140           0 : }
     141             : 
     142           0 : ::grpc::Status Worker::Service::RunServer(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::ServerStatus, ::grpc::testing::ServerArgs>* stream) {
     143             :   (void) context;
     144             :   (void) stream;
     145           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     146             : }
     147             : 
     148           0 : void Worker::AsyncService::RequestRunServer(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::testing::ServerStatus, ::grpc::testing::ServerArgs>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     149           0 :   AsynchronousService::RequestBidiStreaming(1, context, stream, new_call_cq, notification_cq, tag);
     150           0 : }
     151             : 
     152          12 : ::grpc::RpcService* Worker::Service::service() {
     153          12 :   if (service_ != nullptr) {
     154           0 :     return service_;
     155             :   }
     156          12 :   service_ = new ::grpc::RpcService();
     157             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     158             :       Worker_method_names[0],
     159             :       ::grpc::RpcMethod::BIDI_STREAMING,
     160             :       new ::grpc::BidiStreamingHandler< Worker::Service, ::grpc::testing::ClientArgs, ::grpc::testing::ClientStatus>(
     161          12 :           std::mem_fn(&Worker::Service::RunTest), this)));
     162             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     163             :       Worker_method_names[1],
     164             :       ::grpc::RpcMethod::BIDI_STREAMING,
     165             :       new ::grpc::BidiStreamingHandler< Worker::Service, ::grpc::testing::ServerArgs, ::grpc::testing::ServerStatus>(
     166          12 :           std::mem_fn(&Worker::Service::RunServer), this)));
     167          12 :   return service_;
     168             : }
     169             : 
     170             : 
     171             : }  // namespace grpc
     172             : }  // namespace testing
     173             : 

Generated by: LCOV version 1.10