aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/server.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/server.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/server.h')
-rw-r--r--test/cpp/qps/server.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h
index 16d101d5e6..9da33566dd 100644
--- a/test/cpp/qps/server.h
+++ b/test/cpp/qps/server.h
@@ -42,10 +42,9 @@ class Server {
explicit Server(const ServerConfig& config)
: timer_(new UsageTimer), last_reset_poll_count_(0) {
cores_ = gpr_cpu_num_cores();
- if (config.port()) {
+ if (config.port()) { // positive for a fixed port, negative for inproc
port_ = config.port();
-
- } else {
+ } else { // zero for dynamic port
port_ = grpc_pick_unused_port_or_die();
}
}
@@ -115,6 +114,9 @@ class Server {
return 0;
}
+ virtual std::shared_ptr<Channel> InProcessChannel(
+ const ChannelArguments& args) = 0;
+
protected:
static void ApplyConfigToBuilder(const ServerConfig& config,
ServerBuilder* builder) {