Debian Codegraph @

test/cpp/microbenchmarks/callback_test_service.h

raw
1 /*
2 *
3 * Copyright 2019 gRPC authors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #ifndef TEST_CPP_MICROBENCHMARKS_CALLBACK_TEST_SERVICE_H
20 #define TEST_CPP_MICROBENCHMARKS_CALLBACK_TEST_SERVICE_H
21
22 #include <condition_variable>
23 #include <memory>
24 #include <mutex>
25 #include <sstream>
26
27 #include <benchmark/benchmark.h>
28
29 #include "src/proto/grpc/testing/echo.grpc.pb.h"
30 #include "test/cpp/util/string_ref_helper.h"
31
32 namespace grpc {
33 namespace testing {
34
35 const char* const kServerMessageSize = "server_message_size";
36
37 class CallbackStreamingTestService : public EchoTestService::CallbackService {
38 public:
39 CallbackStreamingTestService() {}
40
41 ServerUnaryReactor* Echo(CallbackServerContext* context,
42 const EchoRequest* request,
43 EchoResponse* response) override;
44
45 ServerBidiReactor<EchoRequest, EchoResponse>* BidiStream(
46 CallbackServerContext* context) override;
47 };
48 } // namespace testing
49 } // namespace grpc
50 #endif // TEST_CPP_MICROBENCHMARKS_CALLBACK_TEST_SERVICE_H