aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qps_worker.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-08-24 10:42:27 -0700
committerGravatar Vijay Pai <vpai@google.com>2017-10-19 14:29:13 -0700
commit088112fea12ec364990909cda3a96e7d792480b3 (patch)
tree1fde83a8b7332891ccbb409da0ac97abd3ebe68d /test/cpp/qps/qps_worker.h
parentac581ee24b24d9088d8755ce45daa4ec471ab951 (diff)
Create inproc version of QPS test and add a few simple tests of this to standard testing suite.
Diffstat (limited to 'test/cpp/qps/qps_worker.h')
-rw-r--r--test/cpp/qps/qps_worker.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/cpp/qps/qps_worker.h b/test/cpp/qps/qps_worker.h
index 360125fb17..a5167426d0 100644
--- a/test/cpp/qps/qps_worker.h
+++ b/test/cpp/qps/qps_worker.h
@@ -21,17 +21,21 @@
#include <memory>
+#include <grpc++/server.h>
+#include <grpc++/support/channel_arguments.h>
#include <grpc++/support/config.h>
#include <grpc/support/atm.h>
-namespace grpc {
+#include "test/cpp/qps/server.h"
-class Server;
+namespace grpc {
namespace testing {
class WorkerServiceImpl;
+extern std::vector<grpc::testing::Server*>* g_inproc_servers;
+
class QpsWorker {
public:
explicit QpsWorker(int driver_port, int server_port,
@@ -41,9 +45,13 @@ class QpsWorker {
bool Done() const;
void MarkDone();
+ std::shared_ptr<Channel> InProcessChannel(const ChannelArguments& args) {
+ return server_->InProcessChannel(args);
+ }
+
private:
std::unique_ptr<WorkerServiceImpl> impl_;
- std::unique_ptr<Server> server_;
+ std::unique_ptr<grpc::Server> server_;
gpr_atm done_;
};