From 4c70baa1a16c15ec37200e096b8e7a60fbc254ee Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 21 Oct 2015 07:50:18 -0700 Subject: [PATCH 01/18] Fix sign conversion issues here --- .../network_benchmarks/low_level_ping_pong.c | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index 0ce4bd4b250..26699d0b602 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -82,7 +82,7 @@ typedef struct thread_args { /* Basic call to read() */ static int read_bytes(int fd, char *buf, size_t read_size, int spin) { size_t bytes_read = 0; - int err; + ssize_t err; do { err = read(fd, buf + bytes_read, read_size - bytes_read); if (err < 0) { @@ -96,7 +96,7 @@ static int read_bytes(int fd, char *buf, size_t read_size, int spin) { return -1; } } else { - bytes_read += err; + bytes_read += (size_t)err; } } while (bytes_read < read_size); return 0; @@ -115,6 +115,7 @@ static int poll_read_bytes(int fd, char *buf, size_t read_size, int spin) { struct pollfd pfd; size_t bytes_read = 0; int err; + ssize_t err2; pfd.fd = fd; pfd.events = POLLIN; @@ -132,13 +133,13 @@ static int poll_read_bytes(int fd, char *buf, size_t read_size, int spin) { GPR_ASSERT(err == 1); GPR_ASSERT(pfd.revents == POLLIN); do { - err = read(fd, buf + bytes_read, read_size - bytes_read); - } while (err < 0 && errno == EINTR); - if (err < 0 && errno != EAGAIN) { + err2 = read(fd, buf + bytes_read, read_size - bytes_read); + } while (err2 < 0 && errno == EINTR); + if (err2 < 0 && errno != EAGAIN) { gpr_log(GPR_ERROR, "Read failed: %s", strerror(errno)); return -1; } - bytes_read += err; + bytes_read += (size_t) err2; } while (bytes_read < read_size); return 0; } @@ -157,6 +158,7 @@ static int epoll_read_bytes(struct thread_args *args, char *buf, int spin) { struct epoll_event ev; size_t bytes_read = 0; int err; + ssize_t err2; size_t read_size = args->msg_size; do { @@ -172,10 +174,11 @@ static int epoll_read_bytes(struct thread_args *args, char *buf, int spin) { GPR_ASSERT(ev.data.fd == args->fds.read_fd); do { do { - err = read(args->fds.read_fd, buf + bytes_read, read_size - bytes_read); - } while (err < 0 && errno == EINTR); + err2 = read(args->fds.read_fd, buf + bytes_read, + read_size - bytes_read); + } while (err2 < 0 && errno == EINTR); if (errno == EAGAIN) break; - bytes_read += err; + bytes_read += (size_t) err2; /* TODO(klempner): This should really be doing an extra call after we are done to ensure we see an EAGAIN */ } while (bytes_read < read_size); @@ -199,7 +202,7 @@ static int epoll_read_bytes_spin(struct thread_args *args, char *buf) { */ static int blocking_write_bytes(struct thread_args *args, char *buf) { size_t bytes_written = 0; - int err; + ssize_t err; size_t write_size = args->msg_size; do { err = write(args->fds.write_fd, buf + bytes_written, @@ -212,7 +215,7 @@ static int blocking_write_bytes(struct thread_args *args, char *buf) { return -1; } } else { - bytes_written += err; + bytes_written += (size_t)err; } } while (bytes_written < write_size); return 0; @@ -373,7 +376,7 @@ error: return -1; } -static int connect_client(struct sockaddr *addr, int len) { +static int connect_client(struct sockaddr *addr, socklen_t len) { int fd = socket(addr->sa_family, SOCK_STREAM, 0); int err; if (fd < 0) { @@ -586,7 +589,7 @@ static int run_benchmark(char *socket_type, thread_args *client_args, return 0; } -static int run_all_benchmarks(int msg_size) { +static int run_all_benchmarks(size_t msg_size) { int error = 0; size_t i; for (i = 0; i < GPR_ARRAY_SIZE(test_strategies); ++i) { @@ -643,7 +646,7 @@ int main(int argc, char **argv) { if (read_strategy == NULL) { gpr_log(GPR_INFO, "No strategy specified, running all benchmarks"); - return run_all_benchmarks(msg_size); + return run_all_benchmarks((size_t)msg_size); } if (socket_type == NULL) { @@ -668,12 +671,12 @@ int main(int argc, char **argv) { client_args->read_bytes = test_strategy->read_strategy; client_args->write_bytes = blocking_write_bytes; client_args->setup = test_strategy->setup; - client_args->msg_size = msg_size; + client_args->msg_size = (size_t)msg_size; client_args->strategy_name = read_strategy; server_args->read_bytes = test_strategy->read_strategy; server_args->write_bytes = blocking_write_bytes; server_args->setup = test_strategy->setup; - server_args->msg_size = msg_size; + server_args->msg_size = (size_t)msg_size; server_args->strategy_name = read_strategy; error = run_benchmark(socket_type, client_args, server_args); From 52bfb2564f5507b62d2e18a78ebcb391f2613eb9 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 21 Oct 2015 07:50:49 -0700 Subject: [PATCH 02/18] Split qpstest.proto into two parts - one for performance stats and one for control. Eliminate the use of our own SimpleRequest and SimpleResponse and instead share the one from end2end testing --- Makefile | 47 +++++++++++++++------- build.yaml | 4 +- test/cpp/qps/client.h | 2 +- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.cc | 2 +- test/cpp/qps/driver.h | 2 +- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/perf_db.proto | 2 +- test/cpp/qps/qps_interarrival_test.cc | 2 +- test/cpp/qps/qps_worker.cc | 12 +++--- test/cpp/qps/report.h | 1 - test/cpp/qps/server.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- tools/run_tests/sources_and_headers.json | 8 +++- vsprojects/vcxproj/qps/qps.vcxproj | 24 +++++++++-- vsprojects/vcxproj/qps/qps.vcxproj.filters | 8 +++- 18 files changed, 85 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 044f17b492f..86f3fa90c92 100644 --- a/Makefile +++ b/Makefile @@ -3586,15 +3586,30 @@ $(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_D endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/qpstest.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/qpstest.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_control.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_control.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/qpstest.pb.cc: test/proto/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_control.pb.cc: test/proto/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/qpstest.grpc.pb.cc: test/proto/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_control.grpc.pb.cc: test/proto/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< +endif + +ifeq ($(NO_PROTOC),true) +$(GENDIR)/test/proto/perf_stats.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_stats.grpc.pb.cc: protoc_dep_error +else +$(GENDIR)/test/proto/perf_stats.pb.cc: test/proto/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + +$(GENDIR)/test/proto/perf_stats.grpc.pb.cc: test/proto/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< @@ -5189,7 +5204,9 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ - $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc \ + $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ + $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc \ + $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ @@ -5244,16 +5261,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index 7d2dac5ab64..a0f3eb3d183 100644 --- a/build.yaml +++ b/build.yaml @@ -749,7 +749,9 @@ libs: - test/cpp/qps/timer.h - test/cpp/util/benchmark_config.h src: - - test/proto/qpstest.proto + - test/proto/messages.proto + - test/proto/perf_control.proto + - test/proto/perf_stats.proto - test/cpp/qps/perf_db.proto - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index cd8b34f65b3..a7b246e5d4d 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,7 +40,7 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" #include "test/cpp/util/create_test_channel.h" namespace grpc { diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 9ed42b7db63..98be6395da8 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -48,7 +48,7 @@ #include #include -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index ed4134c7436..320c2b2d551 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -54,7 +54,7 @@ #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index dd5c4f4f73f..500cc510188 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -196,7 +196,7 @@ std::unique_ptr RunScenario( result_client_config.set_host(workers[i + num_servers]); *args.mutable_setup() = client_config; clients[i].stream = - clients[i].stub->RunTest(runsc::AllocContext(&contexts, deadline)); + clients[i].stub->RunClient(runsc::AllocContext(&contexts, deadline)); GPR_ASSERT(clients[i].stream->Write(args)); ClientStatus init_status; GPR_ASSERT(clients[i].stream->Read(&init_status)); diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 6116aa656a9..89e584043de 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -37,7 +37,7 @@ #include #include "test/cpp/qps/histogram.h" -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index 1151cca87c5..7f77aa910ff 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -35,7 +35,7 @@ #define TEST_QPS_HISTOGRAM_H #include -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_stats.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db.proto b/test/cpp/qps/perf_db.proto index 7ae5cfe86e2..0d9aec74cd9 100644 --- a/test/cpp/qps/perf_db.proto +++ b/test/cpp/qps/perf_db.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "test/proto/qpstest.proto"; +import "test/proto/perf_control.proto"; package grpc.testing; diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index a7979e61878..ccda28f09ae 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -42,7 +42,7 @@ using grpc::testing::RandomDist; using grpc::testing::InterarrivalTimer; -void RunTest(RandomDist &&r, int threads, std::string title) { +static void RunTest(RandomDist &&r, int threads, std::string title) { InterarrivalTimer timer; timer.init(r, threads); gpr_histogram *h(gpr_histogram_create(0.01, 60e9)); diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 4ce77f366de..f60d5565146 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -52,7 +52,7 @@ #include #include "test/core/util/grpc_profiler.h" -#include "test/proto/qpstest.pb.h" +#include "test/proto/perf_control.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" @@ -94,8 +94,8 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { explicit WorkerImpl(int server_port) : server_port_(server_port), acquired_(false) {} - Status RunTest(ServerContext* ctx, - ServerReaderWriter* stream) + Status RunClient(ServerContext* ctx, + ServerReaderWriter* stream) GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { @@ -103,7 +103,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { } grpc_profiler_start("qps_client.prof"); - Status ret = RunTestBody(ctx, stream); + Status ret = RunClientBody(ctx, stream); grpc_profiler_stop(); return ret; } @@ -154,8 +154,8 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { acquired_ = false; } - Status RunTestBody(ServerContext* ctx, - ServerReaderWriter* stream) { + Status RunClientBody(ServerContext* ctx, + ServerReaderWriter* stream) { ClientArgs args; if (!stream->Read(&args)) { return Status(StatusCode::INVALID_ARGUMENT, ""); diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index 00d12369d54..78779231d38 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -41,7 +41,6 @@ #include #include "test/cpp/qps/driver.h" -#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/perf_db_client.h" namespace grpc { diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index e48e873dc33..0135138416d 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -35,7 +35,7 @@ #define TEST_QPS_SERVER_H #include "test/cpp/qps/timer.h" -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 98fa9c53e25..64c260b8349 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -49,7 +49,7 @@ #include #include -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" namespace grpc { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index b760ef63ec5..b53dbce56eb 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -43,7 +43,7 @@ #include #include -#include "test/proto/qpstest.grpc.pb.h" +#include "test/proto/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 264e7f70540..181b74eddeb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -13656,8 +13656,12 @@ "test/cpp/qps/stats.h", "test/cpp/qps/timer.h", "test/cpp/util/benchmark_config.h", - "test/proto/qpstest.grpc.pb.h", - "test/proto/qpstest.pb.h" + "test/proto/messages.grpc.pb.h", + "test/proto/messages.pb.h", + "test/proto/perf_control.grpc.pb.h", + "test/proto/perf_control.pb.h", + "test/proto/perf_stats.grpc.pb.h", + "test/proto/perf_stats.pb.h" ], "language": "c++", "name": "qps", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index b361b1b601b..d5aab3725a7 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -147,13 +147,29 @@ - + - + - + - + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index cffb5ff118b..fcf737b6ab7 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -1,7 +1,13 @@ - + + test\proto + + + test\proto + + test\proto From fe8bc196b764e369820e67bbae719a8ddcd46faa Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 21 Oct 2015 09:27:19 -0700 Subject: [PATCH 03/18] Oops - forgot to add the protos! --- test/proto/perf_control.proto | 154 ++++++++++++++++++++++++++++++++++ test/proto/perf_stats.proto | 62 ++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 test/proto/perf_control.proto create mode 100644 test/proto/perf_stats.proto diff --git a/test/proto/perf_control.proto b/test/proto/perf_control.proto new file mode 100644 index 00000000000..8f113e4609c --- /dev/null +++ b/test/proto/perf_control.proto @@ -0,0 +1,154 @@ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +import "test/proto/messages.proto"; +import "test/proto/perf_stats.proto"; + +package grpc.testing; + +enum ClientType { + SYNCHRONOUS_CLIENT = 0; + ASYNC_CLIENT = 1; +} + +enum ServerType { + SYNCHRONOUS_SERVER = 0; + ASYNC_SERVER = 1; +} + +enum RpcType { + UNARY = 0; + STREAMING = 1; +} + +enum LoadType { + CLOSED_LOOP = 0; + POISSON = 1; + UNIFORM = 2; + DETERMINISTIC = 3; + PARETO = 4; +} + +message PoissonParams { + double offered_load = 1; +} + +message UniformParams { + double interarrival_lo = 1; + double interarrival_hi = 2; +} + +message DeterministicParams { + double offered_load = 1; +} + +message ParetoParams { + double interarrival_base = 1; + double alpha = 2; +} + +message LoadParams { + oneof load { + PoissonParams poisson = 1; + UniformParams uniform = 2; + DeterministicParams determ = 3; + ParetoParams pareto = 4; + }; +} + +message ClientConfig { + repeated string server_targets = 1; + ClientType client_type = 2; + bool enable_ssl = 3; + int32 outstanding_rpcs_per_channel = 4; + int32 client_channels = 5; + int32 payload_size = 6; + // only for async client: + int32 async_client_threads = 7; + RpcType rpc_type = 8; + string host = 9; + LoadType load_type = 10; + LoadParams load_params = 11; +} + +message ClientStatus { + ClientStats stats = 1; +} + +// Request current stats +message Mark { +} + +message ClientArgs { + oneof argtype { + ClientConfig setup = 1; + Mark mark = 2; + } +} + +message ServerConfig { + ServerType server_type = 1; + int32 threads = 2; + bool enable_ssl = 3; + string host = 4; +} + +message ServerArgs { + oneof argtype { + ServerConfig setup = 1; + Mark mark = 2; + } +} + +message ServerStatus { + ServerStats stats = 1; + int32 port = 2; +} + +service TestService { + // One request followed by one response. + // The server returns the client payload as-is. + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // One request followed by one response. + // The server returns the client payload as-is. + rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); +} + +service Worker { + // Start server with specified workload + rpc RunServer(stream ServerArgs) returns (stream ServerStatus); + + // Start client with specified workload + rpc RunClient(stream ClientArgs) returns (stream ClientStatus); +} diff --git a/test/proto/perf_stats.proto b/test/proto/perf_stats.proto new file mode 100644 index 00000000000..0a98465f3d9 --- /dev/null +++ b/test/proto/perf_stats.proto @@ -0,0 +1,62 @@ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +package grpc.testing; + +message ServerStats { + // wall clock time + double time_elapsed = 1; + + // user time used by the server process and threads + double time_user = 2; + + // server time used by the server process and all threads + double time_system = 3; +} + +message HistogramData { + repeated uint32 bucket = 1; + double min_seen = 2; + double max_seen = 3; + double sum = 4; + double sum_of_squares = 5; + double count = 6; +} + +message ClientStats { + HistogramData latencies = 1; + double time_elapsed = 2; + double time_user = 3; + double time_system = 4; +} + From 4870de2367adde1c4089f8af14f9fd5d74520e63 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 21 Oct 2015 09:29:41 -0700 Subject: [PATCH 04/18] Fix more shadow and conversion warnings. --- .../network_benchmarks/low_level_ping_pong.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index 26699d0b602..7a2d894481b 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -300,7 +300,7 @@ static void print_histogram(gpr_histogram *histogram) { static double now(void) { gpr_timespec tv = gpr_now(GPR_CLOCK_REALTIME); - return 1e9 * tv.tv_sec + tv.tv_nsec; + return 1e9 * (double)tv.tv_sec + (double)tv.tv_nsec; } static void client_thread(thread_args *args) { @@ -593,23 +593,23 @@ static int run_all_benchmarks(size_t msg_size) { int error = 0; size_t i; for (i = 0; i < GPR_ARRAY_SIZE(test_strategies); ++i) { - test_strategy *test_strategy = &test_strategies[i]; + test_strategy *strategy = &test_strategies[i]; size_t j; for (j = 0; j < GPR_ARRAY_SIZE(socket_types); ++j) { thread_args *client_args = malloc(sizeof(thread_args)); thread_args *server_args = malloc(sizeof(thread_args)); char *socket_type = socket_types[j]; - client_args->read_bytes = test_strategy->read_strategy; + client_args->read_bytes = strategy->read_strategy; client_args->write_bytes = blocking_write_bytes; - client_args->setup = test_strategy->setup; + client_args->setup = strategy->setup; client_args->msg_size = msg_size; - client_args->strategy_name = test_strategy->name; - server_args->read_bytes = test_strategy->read_strategy; + client_args->strategy_name = strategy->name; + server_args->read_bytes = strategy->read_strategy; server_args->write_bytes = blocking_write_bytes; - server_args->setup = test_strategy->setup; + server_args->setup = strategy->setup; server_args->msg_size = msg_size; - server_args->strategy_name = test_strategy->name; + server_args->strategy_name = strategy->name; error = run_benchmark(socket_type, client_args, server_args); if (error < 0) { return error; @@ -626,7 +626,7 @@ int main(int argc, char **argv) { char *read_strategy = NULL; char *socket_type = NULL; size_t i; - const test_strategy *test_strategy = NULL; + const test_strategy *strategy = NULL; int error = 0; gpr_cmdline *cmdline = @@ -660,22 +660,22 @@ int main(int argc, char **argv) { for (i = 0; i < GPR_ARRAY_SIZE(test_strategies); ++i) { if (strcmp(test_strategies[i].name, read_strategy) == 0) { - test_strategy = &test_strategies[i]; + strategy = &test_strategies[i]; } } - if (test_strategy == NULL) { + if (strategy == NULL) { fprintf(stderr, "Invalid read strategy %s\n", read_strategy); return -1; } - client_args->read_bytes = test_strategy->read_strategy; + client_args->read_bytes = strategy->read_strategy; client_args->write_bytes = blocking_write_bytes; - client_args->setup = test_strategy->setup; + client_args->setup = strategy->setup; client_args->msg_size = (size_t)msg_size; client_args->strategy_name = read_strategy; - server_args->read_bytes = test_strategy->read_strategy; + server_args->read_bytes = strategy->read_strategy; server_args->write_bytes = blocking_write_bytes; - server_args->setup = test_strategy->setup; + server_args->setup = strategy->setup; server_args->msg_size = (size_t)msg_size; server_args->strategy_name = read_strategy; From 4b69152e7fa771471ebd75d67ed80579b211b3a3 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 28 Oct 2015 01:11:22 -0700 Subject: [PATCH 05/18] Eliminate qpstest.proto --- test/proto/qpstest.proto | 218 --------------------------------------- 1 file changed, 218 deletions(-) delete mode 100644 test/proto/qpstest.proto diff --git a/test/proto/qpstest.proto b/test/proto/qpstest.proto deleted file mode 100644 index ef1f9451e9a..00000000000 --- a/test/proto/qpstest.proto +++ /dev/null @@ -1,218 +0,0 @@ - -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. -syntax = "proto3"; - -package grpc.testing; - -enum PayloadType { - // Compressable text format. - COMPRESSABLE = 0; - - // Uncompressable binary format. - UNCOMPRESSABLE = 1; - - // Randomly chosen from all other formats defined in this enum. - RANDOM = 2; -} - -message StatsRequest { - // run number - int32 test_num = 1; -} - -message ServerStats { - // wall clock time - double time_elapsed = 1; - - // user time used by the server process and threads - double time_user = 2; - - // server time used by the server process and all threads - double time_system = 3; -} - -message Payload { - // The type of data in body. - PayloadType type = 1; - // Primary contents of payload. - bytes body = 2; -} - -message HistogramData { - repeated uint32 bucket = 1; - double min_seen = 2; - double max_seen = 3; - double sum = 4; - double sum_of_squares = 5; - double count = 6; -} - -enum ClientType { - SYNCHRONOUS_CLIENT = 0; - ASYNC_CLIENT = 1; -} - -enum ServerType { - SYNCHRONOUS_SERVER = 0; - ASYNC_SERVER = 1; -} - -enum RpcType { - UNARY = 0; - STREAMING = 1; -} - -enum LoadType { - CLOSED_LOOP = 0; - POISSON = 1; - UNIFORM = 2; - DETERMINISTIC = 3; - PARETO = 4; -} - -message PoissonParams { - double offered_load = 1; -} - -message UniformParams { - double interarrival_lo = 1; - double interarrival_hi = 2; -} - -message DeterministicParams { - double offered_load = 1; -} - -message ParetoParams { - double interarrival_base = 1; - double alpha = 2; -} - -message LoadParams { - oneof load { - PoissonParams poisson = 1; - UniformParams uniform = 2; - DeterministicParams determ = 3; - ParetoParams pareto = 4; - }; -} - -message ClientConfig { - repeated string server_targets = 1; - ClientType client_type = 2; - bool enable_ssl = 3; - int32 outstanding_rpcs_per_channel = 4; - int32 client_channels = 5; - int32 payload_size = 6; - // only for async client: - int32 async_client_threads = 7; - RpcType rpc_type = 8; - string host = 9; - LoadType load_type = 10; - LoadParams load_params = 11; -} - -// Request current stats -message Mark { -} - -message ClientArgs { - oneof argtype { - ClientConfig setup = 1; - Mark mark = 2; - } -} - -message ClientStats { - HistogramData latencies = 1; - double time_elapsed = 2; - double time_user = 3; - double time_system = 4; -} - -message ClientStatus { - ClientStats stats = 1; -} - -message ServerConfig { - ServerType server_type = 1; - int32 threads = 2; - bool enable_ssl = 3; - string host = 4; -} - -message ServerArgs { - oneof argtype { - ServerConfig setup = 1; - Mark mark = 2; - } -} - -message ServerStatus { - ServerStats stats = 1; - int32 port = 2; -} - -message SimpleRequest { - // Desired payload type in the response from the server. - // If response_type is RANDOM, server randomly chooses one from other formats. - PayloadType response_type = 1; - - // Desired payload size in the response from the server. - // If response_type is COMPRESSABLE, this denotes the size before compression. - int32 response_size = 2; - - // Optional input payload sent along with the request. - Payload payload = 3; -} - -message SimpleResponse { - Payload payload = 1; -} - -service TestService { - // One request followed by one response. - // The server returns the client payload as-is. - rpc UnaryCall(SimpleRequest) returns (SimpleResponse); - - // One request followed by one response. - // The server returns the client payload as-is. - rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); -} - -service Worker { - // Start test with specified workload - rpc RunTest(stream ClientArgs) returns (stream ClientStatus); - // Start test with specified workload - rpc RunServer(stream ServerArgs) returns (stream ServerStatus); -} From 754751e3c60d416beb92938d7d453b23fa57dd7e Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 28 Oct 2015 09:16:22 -0700 Subject: [PATCH 06/18] Numerous proto changes to make things more sane and fix some outstanding issues --- Makefile | 40 +++++------ build.yaml | 4 +- .../cpp/qps/async_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/async_unary_ping_pong_test.cc | 4 +- test/cpp/qps/client.h | 54 +++++++------- test/cpp/qps/client_async.cc | 6 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.h | 2 +- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/perf_db.proto | 2 +- test/cpp/qps/qps_driver.cc | 71 ++++++++----------- test/cpp/qps/qps_openloop_test.cc | 5 +- test/cpp/qps/qps_test.cc | 4 +- test/cpp/qps/qps_test_with_poll.cc | 4 +- test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/server.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- test/cpp/qps/sync_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/sync_unary_ping_pong_test.cc | 4 +- .../proto/{ => perf_tests}/perf_control.proto | 17 ++--- test/proto/{ => perf_tests}/perf_stats.proto | 0 tools/run_tests/sources_and_headers.json | 8 +-- vsprojects/vcxproj/qps/qps.vcxproj | 16 ++--- vsprojects/vcxproj/qps/qps.vcxproj.filters | 11 +-- 25 files changed, 123 insertions(+), 149 deletions(-) rename test/proto/{ => perf_tests}/perf_control.proto (94%) rename test/proto/{ => perf_tests}/perf_stats.proto (100%) diff --git a/Makefile b/Makefile index 86f3fa90c92..1f2c93af72d 100644 --- a/Makefile +++ b/Makefile @@ -3586,30 +3586,30 @@ $(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_D endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/perf_control.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/perf_control.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_tests/perf_control.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/perf_control.pb.cc: test/proto/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_tests/perf_control.pb.cc: test/proto/perf_tests/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/perf_control.grpc.pb.cc: test/proto/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc: test/proto/perf_tests/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/perf_stats.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/perf_stats.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/perf_stats.pb.cc: test/proto/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc: test/proto/perf_tests/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/perf_stats.grpc.pb.cc: test/proto/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc: test/proto/perf_tests/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< @@ -5205,8 +5205,8 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc \ - $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc \ + $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc \ + $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ @@ -5261,16 +5261,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_control.pb.cc $(GENDIR)/test/proto/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_stats.pb.cc $(GENDIR)/test/proto/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index a0f3eb3d183..b8c53f2739f 100644 --- a/build.yaml +++ b/build.yaml @@ -750,8 +750,8 @@ libs: - test/cpp/util/benchmark_config.h src: - test/proto/messages.proto - - test/proto/perf_control.proto - - test/proto/perf_stats.proto + - test/proto/perf_tests/perf_control.proto + - test/proto/perf_tests/perf_stats.proto - test/cpp/qps/perf_db.proto - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index 411df4d32af..2d3ebfdfdb4 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -52,7 +52,7 @@ static void RunAsyncStreamingPingPong() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); @@ -61,7 +61,7 @@ static void RunAsyncStreamingPingPong() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(1); const auto result = diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index eda31b57442..a5f91c51575 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -52,7 +52,7 @@ static void RunAsyncUnaryPingPong() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); @@ -61,7 +61,7 @@ static void RunAsyncUnaryPingPong() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(1); const auto result = diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index a7b246e5d4d..7086ae820af 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,7 +40,7 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/util/create_test_channel.h" namespace grpc { @@ -122,7 +122,7 @@ class Client { // We have to use a 2-phase init like this with a default // constructor followed by an initializer function to make // old compilers happy with using this in std::vector - channel_ = CreateTestChannel(target, config.enable_ssl()); + channel_ = CreateTestChannel(target, config.use_tls()); stub_ = TestService::NewStub(channel_); } Channel* get_channel() { return channel_.get(); } @@ -146,37 +146,31 @@ class Client { void SetupLoadTest(const ClientConfig& config, size_t num_threads) { // Set up the load distribution based on the number of threads - if (config.load_type() == CLOSED_LOOP) { + const auto& load = config.load_params(); + + std::unique_ptr random_dist; + if (load.has_poisson()) { + random_dist.reset(new ExpDist(load.poisson().offered_load() / + num_threads)); + } else if (load.has_uniform()) { + random_dist.reset(new UniformDist(load.uniform().interarrival_lo() * + num_threads, + load.uniform().interarrival_hi() * + num_threads)); + } else if (load.has_determ()) { + random_dist.reset(new DetDist(num_threads / load.determ().offered_load())); + } else if (load.has_pareto()) { + random_dist.reset(new ParetoDist(load.pareto().interarrival_base() * num_threads, + load.pareto().alpha())); + } else { // No load parameters, so must be closed-loop + } + + // Set closed_loop_ based on whether or not random_dist is set + if (!random_dist) { closed_loop_ = true; } else { closed_loop_ = false; - - std::unique_ptr random_dist; - const auto& load = config.load_params(); - switch (config.load_type()) { - case POISSON: - random_dist.reset( - new ExpDist(load.poisson().offered_load() / num_threads)); - break; - case UNIFORM: - random_dist.reset( - new UniformDist(load.uniform().interarrival_lo() * num_threads, - load.uniform().interarrival_hi() * num_threads)); - break; - case DETERMINISTIC: - random_dist.reset( - new DetDist(num_threads / load.determ().offered_load())); - break; - case PARETO: - random_dist.reset( - new ParetoDist(load.pareto().interarrival_base() * num_threads, - load.pareto().alpha())); - break; - default: - GPR_ASSERT(false); - break; - } - + // set up interarrival timer according to random dist interarrival_timer_.init(*random_dist, num_threads); for (size_t i = 0; i < num_threads; i++) { next_time_.push_back( diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 98be6395da8..cef17fa1f9a 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -48,7 +48,7 @@ #include #include -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" @@ -439,8 +439,8 @@ class AsyncStreamingClient GRPC_FINAL : public AsyncClient { public: explicit AsyncStreamingClient(const ClientConfig& config) : AsyncClient(config, SetupCtx) { - // async streaming currently only supported closed loop - GPR_ASSERT(config.load_type() == CLOSED_LOOP); + // async streaming currently only supports closed loop + GPR_ASSERT(closed_loop_); StartThreads(config.async_client_threads()); } diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 320c2b2d551..b9d857c4826 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -54,7 +54,7 @@ #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 89e584043de..7f69c013b70 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -37,7 +37,7 @@ #include #include "test/cpp/qps/histogram.h" -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index 7f77aa910ff..8ea9cb62e1a 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -35,7 +35,7 @@ #define TEST_QPS_HISTOGRAM_H #include -#include "test/proto/perf_stats.grpc.pb.h" +#include "test/proto/perf_tests/perf_stats.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db.proto b/test/cpp/qps/perf_db.proto index 0d9aec74cd9..42334e36abb 100644 --- a/test/cpp/qps/perf_db.proto +++ b/test/cpp/qps/perf_db.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "test/proto/perf_control.proto"; +import "test/proto/perf_tests/perf_control.proto"; package grpc.testing; diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index b1463be8f62..3d352b4996e 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -50,7 +50,7 @@ DEFINE_int32(benchmark_seconds, 30, "Benchmark time (in seconds)"); DEFINE_int32(local_workers, 0, "Number of local workers to start"); // Common config -DEFINE_bool(enable_ssl, false, "Use SSL"); +DEFINE_bool(use_tls, false, "Use TLS"); DEFINE_string(rpc_type, "UNARY", "Type of RPC: UNARY or STREAMING"); // Server config @@ -64,15 +64,20 @@ DEFINE_int32(client_channels, 1, "Number of client channels"); DEFINE_int32(payload_size, 1, "Payload size"); DEFINE_string(client_type, "SYNCHRONOUS_CLIENT", "Client type"); DEFINE_int32(async_client_threads, 1, "Async client threads"); + +DEFINE_double(poisson_load, -1.0, "Poisson offered load (qps)"); +DEFINE_double(uniform_lo, -1.0, "Uniform low interarrival time (us)"); +DEFINE_double(uniform_hi, -1.0, "Uniform high interarrival time (us)"); +DEFINE_double(determ_load, -1.0, "Deterministic offered load (qps)"); +DEFINE_double(pareto_base, -1.0, "Pareto base interarrival time (us)"); +DEFINE_double(pareto_alpha, -1.0, "Pareto alpha value"); + DEFINE_string(load_type, "CLOSED_LOOP", "Load type"); -DEFINE_double(load_param_1, 0.0, "Load parameter 1"); -DEFINE_double(load_param_2, 0.0, "Load parameter 2"); using grpc::testing::ClientConfig; using grpc::testing::ServerConfig; using grpc::testing::ClientType; using grpc::testing::ServerType; -using grpc::testing::LoadType; using grpc::testing::RpcType; using grpc::testing::ResourceUsage; @@ -85,15 +90,12 @@ static void QpsDriver() { ClientType client_type; ServerType server_type; - LoadType load_type; GPR_ASSERT(ClientType_Parse(FLAGS_client_type, &client_type)); GPR_ASSERT(ServerType_Parse(FLAGS_server_type, &server_type)); - GPR_ASSERT(LoadType_Parse(FLAGS_load_type, &load_type)); ClientConfig client_config; client_config.set_client_type(client_type); - client_config.set_load_type(load_type); - client_config.set_enable_ssl(FLAGS_enable_ssl); + client_config.set_use_tls(FLAGS_use_tls); client_config.set_outstanding_rpcs_per_channel( FLAGS_outstanding_rpcs_per_channel); client_config.set_client_channels(FLAGS_client_channels); @@ -102,46 +104,29 @@ static void QpsDriver() { client_config.set_rpc_type(rpc_type); // set up the load parameters - switch (load_type) { - case grpc::testing::CLOSED_LOOP: - break; - case grpc::testing::POISSON: { - auto poisson = client_config.mutable_load_params()->mutable_poisson(); - GPR_ASSERT(FLAGS_load_param_1 != 0.0); - poisson->set_offered_load(FLAGS_load_param_1); - break; - } - case grpc::testing::UNIFORM: { - auto uniform = client_config.mutable_load_params()->mutable_uniform(); - GPR_ASSERT(FLAGS_load_param_1 != 0.0); - GPR_ASSERT(FLAGS_load_param_2 != 0.0); - uniform->set_interarrival_lo(FLAGS_load_param_1 / 1e6); - uniform->set_interarrival_hi(FLAGS_load_param_2 / 1e6); - break; - } - case grpc::testing::DETERMINISTIC: { - auto determ = client_config.mutable_load_params()->mutable_determ(); - GPR_ASSERT(FLAGS_load_param_1 != 0.0); - determ->set_offered_load(FLAGS_load_param_1); - break; - } - case grpc::testing::PARETO: { - auto pareto = client_config.mutable_load_params()->mutable_pareto(); - GPR_ASSERT(FLAGS_load_param_1 != 0.0); - GPR_ASSERT(FLAGS_load_param_2 != 0.0); - pareto->set_interarrival_base(FLAGS_load_param_1 / 1e6); - pareto->set_alpha(FLAGS_load_param_2); - break; - } - default: - GPR_ASSERT(false); - break; + if (FLAGS_poisson_load > 0.0) { + auto poisson = client_config.mutable_load_params()->mutable_poisson(); + poisson->set_offered_load(FLAGS_poisson_load); + } else if (FLAGS_uniform_lo > 0.0) { + auto uniform = client_config.mutable_load_params()->mutable_uniform(); + uniform->set_interarrival_lo(FLAGS_uniform_lo / 1e6); + uniform->set_interarrival_hi(FLAGS_uniform_hi / 1e6); + } else if (FLAGS_determ_load > 0.0) { + auto determ = client_config.mutable_load_params()->mutable_determ(); + determ->set_offered_load(FLAGS_determ_load); + } else if (FLAGS_pareto_base > 0.0) { + auto pareto = client_config.mutable_load_params()->mutable_pareto(); + pareto->set_interarrival_base(FLAGS_pareto_base / 1e6); + pareto->set_alpha(FLAGS_pareto_alpha); + } else { + // Default is closed loop + // No need to set up any other load parameters here } ServerConfig server_config; server_config.set_server_type(server_type); server_config.set_threads(FLAGS_server_threads); - server_config.set_enable_ssl(FLAGS_enable_ssl); + server_config.set_use_tls(FLAGS_use_tls); // If we're running a sync-server streaming test, make sure // that we have at least as many threads as the active streams diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 5a6a9249a93..918381b8509 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -52,19 +52,18 @@ static void RunQPS() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); client_config.set_payload_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); - client_config.set_load_type(POISSON); client_config.mutable_load_params()->mutable_poisson()->set_offered_load( 1000.0); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(4); const auto result = diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index d0c4a79cd92..c3dbc255740 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -52,7 +52,7 @@ static void RunQPS() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); client_config.set_payload_size(1); @@ -61,7 +61,7 @@ static void RunQPS() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(8); const auto result = diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc index 31d2c1bf7b4..a7a11a615cc 100644 --- a/test/cpp/qps/qps_test_with_poll.cc +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -56,7 +56,7 @@ static void RunQPS() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); client_config.set_payload_size(1); @@ -65,7 +65,7 @@ static void RunQPS() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(4); const auto result = diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f60d5565146..f16740b18d7 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -52,7 +52,7 @@ #include #include "test/core/util/grpc_profiler.h" -#include "test/proto/perf_control.pb.h" +#include "test/proto/perf_tests/perf_control.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 0135138416d..ba8394badc3 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -35,7 +35,7 @@ #define TEST_QPS_SERVER_H #include "test/cpp/qps/timer.h" -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 64c260b8349..db5218629af 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -49,7 +49,7 @@ #include #include -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" namespace grpc { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index b53dbce56eb..2b83548d19e 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -43,7 +43,7 @@ #include #include -#include "test/proto/perf_control.grpc.pb.h" +#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index 52e43939a81..6dddb9ef228 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -52,7 +52,7 @@ static void RunSynchronousStreamingPingPong() { ClientConfig client_config; client_config.set_client_type(SYNCHRONOUS_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); @@ -60,7 +60,7 @@ static void RunSynchronousStreamingPingPong() { ServerConfig server_config; server_config.set_server_type(SYNCHRONOUS_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(1); const auto result = diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index fbd21357aa5..774e70e1977 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -52,7 +52,7 @@ static void RunSynchronousUnaryPingPong() { ClientConfig client_config; client_config.set_client_type(SYNCHRONOUS_CLIENT); - client_config.set_enable_ssl(false); + client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); @@ -60,7 +60,7 @@ static void RunSynchronousUnaryPingPong() { ServerConfig server_config; server_config.set_server_type(SYNCHRONOUS_SERVER); - server_config.set_enable_ssl(false); + server_config.set_use_tls(false); server_config.set_threads(1); const auto result = diff --git a/test/proto/perf_control.proto b/test/proto/perf_tests/perf_control.proto similarity index 94% rename from test/proto/perf_control.proto rename to test/proto/perf_tests/perf_control.proto index 8f113e4609c..9c3e82285fc 100644 --- a/test/proto/perf_control.proto +++ b/test/proto/perf_tests/perf_control.proto @@ -32,7 +32,7 @@ syntax = "proto3"; import "test/proto/messages.proto"; -import "test/proto/perf_stats.proto"; +import "test/proto/perf_tests/perf_stats.proto"; package grpc.testing; @@ -51,14 +51,6 @@ enum RpcType { STREAMING = 1; } -enum LoadType { - CLOSED_LOOP = 0; - POISSON = 1; - UNIFORM = 2; - DETERMINISTIC = 3; - PARETO = 4; -} - message PoissonParams { double offered_load = 1; } @@ -83,13 +75,15 @@ message LoadParams { UniformParams uniform = 2; DeterministicParams determ = 3; ParetoParams pareto = 4; + // No need to separately specify Closed-Loop as that + // will just be the absence of any of the above }; } message ClientConfig { repeated string server_targets = 1; ClientType client_type = 2; - bool enable_ssl = 3; + bool use_tls = 3; int32 outstanding_rpcs_per_channel = 4; int32 client_channels = 5; int32 payload_size = 6; @@ -97,7 +91,6 @@ message ClientConfig { int32 async_client_threads = 7; RpcType rpc_type = 8; string host = 9; - LoadType load_type = 10; LoadParams load_params = 11; } @@ -119,7 +112,7 @@ message ClientArgs { message ServerConfig { ServerType server_type = 1; int32 threads = 2; - bool enable_ssl = 3; + bool use_tls = 3; string host = 4; } diff --git a/test/proto/perf_stats.proto b/test/proto/perf_tests/perf_stats.proto similarity index 100% rename from test/proto/perf_stats.proto rename to test/proto/perf_tests/perf_stats.proto diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 181b74eddeb..60abb62e3a3 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -13658,10 +13658,10 @@ "test/cpp/util/benchmark_config.h", "test/proto/messages.grpc.pb.h", "test/proto/messages.pb.h", - "test/proto/perf_control.grpc.pb.h", - "test/proto/perf_control.pb.h", - "test/proto/perf_stats.grpc.pb.h", - "test/proto/perf_stats.pb.h" + "test/proto/perf_tests/perf_control.grpc.pb.h", + "test/proto/perf_tests/perf_control.pb.h", + "test/proto/perf_tests/perf_stats.grpc.pb.h", + "test/proto/perf_tests/perf_stats.pb.h" ], "language": "c++", "name": "qps", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index d5aab3725a7..e1987dba5dd 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -155,21 +155,21 @@ - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index fcf737b6ab7..f679ad4d543 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -4,11 +4,11 @@ test\proto - - test\proto + + test\proto\perf_tests - - test\proto + + test\proto\perf_tests test\cpp\qps @@ -96,6 +96,9 @@ {44e63a33-67f4-0575-e87a-711a7c9111e2} + + {cf788def-630c-8a5f-9a8c-6abdd500d712} + From 119c103ab00f309a66de6f1cb78c648eb3c4e2cc Mon Sep 17 00:00:00 2001 From: vjpai Date: Thu, 29 Oct 2015 01:21:04 -0700 Subject: [PATCH 07/18] Split up into a new service proto, use proper service suffix, add a reset option to the mark, create a closed loop config params (empty message) for consistency with other tests. --- Makefile | 36 +++++++--- build.yaml | 1 + include/grpc/support/histogram.h | 2 +- src/core/support/histogram.c | 2 +- .../cpp/qps/async_streaming_ping_pong_test.cc | 1 + test/cpp/qps/async_unary_ping_pong_test.cc | 1 + test/cpp/qps/client.h | 71 ++++++++++++------- test/cpp/qps/client_async.cc | 28 ++++---- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.cc | 13 ++-- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/qps_driver.cc | 6 +- test/cpp/qps/qps_test.cc | 1 + test/cpp/qps/qps_test_with_poll.cc | 1 + test/cpp/qps/qps_worker.cc | 16 ++--- test/cpp/qps/qps_worker.h | 4 +- test/cpp/qps/server.h | 15 ++-- test/cpp/qps/server_async.cc | 8 +-- test/cpp/qps/server_sync.cc | 6 +- test/cpp/qps/sync_streaming_ping_pong_test.cc | 1 + test/cpp/qps/sync_unary_ping_pong_test.cc | 1 + test/cpp/qps/timer.cc | 2 +- test/cpp/qps/timer.h | 2 +- test/proto/perf_tests/perf_control.proto | 26 ++----- test/proto/perf_tests/perf_services.proto | 56 +++++++++++++++ tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/qps/qps.vcxproj | 8 +++ vsprojects/vcxproj/qps/qps.vcxproj.filters | 3 + 28 files changed, 207 insertions(+), 110 deletions(-) create mode 100644 test/proto/perf_tests/perf_services.proto diff --git a/Makefile b/Makefile index 1f2c93af72d..0dd0f266eee 100644 --- a/Makefile +++ b/Makefile @@ -3600,6 +3600,21 @@ $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc: test/proto/perf_tests/p $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/test/proto/perf_tests/perf_services.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc: protoc_dep_error +else +$(GENDIR)/test/proto/perf_tests/perf_services.pb.cc: test/proto/perf_tests/perf_services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + +$(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc: test/proto/perf_tests/perf_services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc: protoc_dep_error $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc: protoc_dep_error @@ -5206,6 +5221,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc \ + $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc \ $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ @@ -5261,16 +5277,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index b8c53f2739f..a90cd12b15e 100644 --- a/build.yaml +++ b/build.yaml @@ -751,6 +751,7 @@ libs: src: - test/proto/messages.proto - test/proto/perf_tests/perf_control.proto + - test/proto/perf_tests/perf_services.proto - test/proto/perf_tests/perf_stats.proto - test/cpp/qps/perf_db.proto - test/cpp/qps/client_async.cc diff --git a/include/grpc/support/histogram.h b/include/grpc/support/histogram.h index 2fd1084208f..fd56dacc989 100644 --- a/include/grpc/support/histogram.h +++ b/include/grpc/support/histogram.h @@ -50,7 +50,7 @@ void gpr_histogram_add(gpr_histogram *h, double x); /* The following merges the second histogram into the first. It only works if they have the same buckets and resolution. Returns 0 on failure, 1 on success */ -int gpr_histogram_merge(gpr_histogram *dst, gpr_histogram *src); +int gpr_histogram_merge(gpr_histogram *dst, const gpr_histogram *src); double gpr_histogram_percentile(gpr_histogram *histogram, double percentile); double gpr_histogram_mean(gpr_histogram *histogram); diff --git a/src/core/support/histogram.c b/src/core/support/histogram.c index 8a1a9d92330..77b48af9969 100644 --- a/src/core/support/histogram.c +++ b/src/core/support/histogram.c @@ -125,7 +125,7 @@ void gpr_histogram_add(gpr_histogram *h, double x) { h->buckets[bucket_for(h, x)]++; } -int gpr_histogram_merge(gpr_histogram *dst, gpr_histogram *src) { +int gpr_histogram_merge(gpr_histogram *dst, const gpr_histogram *src) { if ((dst->num_buckets != src->num_buckets) || (dst->multiplier != src->multiplier)) { /* Fail because these histograms don't match */ diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index 2d3ebfdfdb4..e3a614e7433 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -58,6 +58,7 @@ static void RunAsyncStreamingPingPong() { client_config.set_payload_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(STREAMING); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index a5f91c51575..caed835325e 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -58,6 +58,7 @@ static void RunAsyncUnaryPingPong() { client_config.set_payload_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 7086ae820af..110249bd259 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,8 +40,8 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/util/create_test_channel.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" namespace grpc { @@ -80,22 +80,31 @@ class Client { } virtual ~Client() {} - ClientStats Mark() { + ClientStats Mark(bool reset) { Histogram latencies; + Timer::Result timer_result; + // avoid std::vector for old compilers that expect a copy constructor - Histogram* to_merge = new Histogram[threads_.size()]; - for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->BeginSwap(&to_merge[i]); - } - std::unique_ptr timer(new Timer); - timer_.swap(timer); - for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->EndSwap(); - latencies.Merge(&to_merge[i]); + if (reset) { + Histogram* to_merge = new Histogram[threads_.size()]; + for (size_t i = 0; i < threads_.size(); i++) { + threads_[i]->BeginSwap(&to_merge[i]); + } + std::unique_ptr timer(new Timer); + timer_.swap(timer); + for (size_t i = 0; i < threads_.size(); i++) { + threads_[i]->EndSwap(); + latencies.Merge(to_merge[i]); + } + delete[] to_merge; + timer_result = timer->Mark(); + } else { + // merge snapshots of each thread histogram + for (size_t i = 0; i < threads_.size(); i++) { + threads_[i]->MergeStatsInto(&latencies); + } + timer_result = timer_->Mark(); } - delete[] to_merge; - - auto timer_result = timer->Mark(); ClientStats stats; latencies.FillProto(stats.mutable_latencies()); @@ -123,14 +132,14 @@ class Client { // constructor followed by an initializer function to make // old compilers happy with using this in std::vector channel_ = CreateTestChannel(target, config.use_tls()); - stub_ = TestService::NewStub(channel_); + stub_ = BenchmarkService::NewStub(channel_); } Channel* get_channel() { return channel_.get(); } - TestService::Stub* get_stub() { return stub_.get(); } + BenchmarkService::Stub* get_stub() { return stub_.get(); } private: std::shared_ptr channel_; - std::unique_ptr stub_; + std::unique_ptr stub_; }; std::vector channels_; @@ -162,7 +171,10 @@ class Client { } else if (load.has_pareto()) { random_dist.reset(new ParetoDist(load.pareto().interarrival_base() * num_threads, load.pareto().alpha())); - } else { // No load parameters, so must be closed-loop + } else if (load.has_closed()) { + // Closed-loop doesn't use random dist at all + } else { // invalid load type + GPR_ASSERT(false); } // Set closed_loop_ based on whether or not random_dist is set @@ -198,7 +210,7 @@ class Client { public: Thread(Client* client, size_t idx) : done_(false), - new_(nullptr), + new_stats_(nullptr), client_(client), idx_(idx), impl_(&Thread::ThreadFunc, this) {} @@ -213,16 +225,21 @@ class Client { void BeginSwap(Histogram* n) { std::lock_guard g(mu_); - new_ = n; + new_stats_ = n; } void EndSwap() { std::unique_lock g(mu_); - while (new_ != nullptr) { + while (new_stats_ != nullptr) { cv_.wait(g); }; } + void MergeStatsInto(Histogram* hist) { + std::unique_lock g(mu_); + hist->Merge(histogram_); + } + private: Thread(const Thread&); Thread& operator=(const Thread&); @@ -240,21 +257,21 @@ class Client { if (done_) { return; } - // check if we're marking, swap out the histogram if so - if (new_) { - new_->Swap(&histogram_); - new_ = nullptr; + // check if we're resetting stats, swap out the histogram if so + if (new_stats_) { + new_stats_->Swap(&histogram_); + new_stats_ = nullptr; cv_.notify_one(); } } } - TestService::Stub* stub_; + BenchmarkService::Stub* stub_; ClientConfig config_; std::mutex mu_; std::condition_variable cv_; bool done_; - Histogram* new_; + Histogram* new_stats_; Histogram histogram_; Client* client_; size_t idx_; diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index cef17fa1f9a..41db6151c5a 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -48,10 +48,10 @@ #include #include -#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" namespace grpc { namespace testing { @@ -88,10 +88,10 @@ template class ClientRpcContextUnaryImpl : public ClientRpcContext { public: ClientRpcContextUnaryImpl( - int channel_id, TestService::Stub* stub, const RequestType& req, + int channel_id, BenchmarkService::Stub* stub, const RequestType& req, std::function< std::unique_ptr>( - TestService::Stub*, grpc::ClientContext*, const RequestType&, + BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, CompletionQueue*)> start_req, std::function on_done) : ClientRpcContext(channel_id), @@ -131,13 +131,13 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { return true; // we're done, this'll be ignored } grpc::ClientContext context_; - TestService::Stub* stub_; + BenchmarkService::Stub* stub_; RequestType req_; ResponseType response_; bool (ClientRpcContextUnaryImpl::*next_state_)(bool); std::function callback_; std::function>( - TestService::Stub*, grpc::ClientContext*, const RequestType&, + BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, CompletionQueue*)> start_req_; grpc::Status status_; double start_; @@ -151,7 +151,7 @@ class AsyncClient : public Client { public: explicit AsyncClient( const ClientConfig& config, - std::function setup_ctx) : Client(config), channel_lock_(new std::mutex[config.client_channels()]), @@ -354,11 +354,11 @@ class AsyncUnaryClient GRPC_FINAL : public AsyncClient { private: static void CheckDone(grpc::Status s, SimpleResponse* response) {} static std::unique_ptr> - StartReq(TestService::Stub* stub, grpc::ClientContext* ctx, + StartReq(BenchmarkService::Stub* stub, grpc::ClientContext* ctx, const SimpleRequest& request, CompletionQueue* cq) { return stub->AsyncUnaryCall(ctx, request, cq); }; - static ClientRpcContext* SetupCtx(int channel_id, TestService::Stub* stub, + static ClientRpcContext* SetupCtx(int channel_id, BenchmarkService::Stub* stub, const SimpleRequest& req) { return new ClientRpcContextUnaryImpl( channel_id, stub, req, AsyncUnaryClient::StartReq, @@ -370,9 +370,9 @@ template class ClientRpcContextStreamingImpl : public ClientRpcContext { public: ClientRpcContextStreamingImpl( - int channel_id, TestService::Stub* stub, const RequestType& req, + int channel_id, BenchmarkService::Stub* stub, const RequestType& req, std::function>(TestService::Stub*, grpc::ClientContext*, + RequestType, ResponseType>>(BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)> start_req, std::function on_done) : ClientRpcContext(channel_id), @@ -420,14 +420,14 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { return StartWrite(ok); } grpc::ClientContext context_; - TestService::Stub* stub_; + BenchmarkService::Stub* stub_; RequestType req_; ResponseType response_; bool (ClientRpcContextStreamingImpl::*next_state_)(bool, Histogram*); std::function callback_; std::function< std::unique_ptr>( - TestService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)> + BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)> start_req_; grpc::Status status_; double start_; @@ -451,12 +451,12 @@ class AsyncStreamingClient GRPC_FINAL : public AsyncClient { static void CheckDone(grpc::Status s, SimpleResponse* response) {} static std::unique_ptr< grpc::ClientAsyncReaderWriter> - StartReq(TestService::Stub* stub, grpc::ClientContext* ctx, + StartReq(BenchmarkService::Stub* stub, grpc::ClientContext* ctx, CompletionQueue* cq, void* tag) { auto stream = stub->AsyncStreamingCall(ctx, cq, tag); return stream; }; - static ClientRpcContext* SetupCtx(int channel_id, TestService::Stub* stub, + static ClientRpcContext* SetupCtx(int channel_id, BenchmarkService::Stub* stub, const SimpleRequest& req) { return new ClientRpcContextStreamingImpl( channel_id, stub, req, AsyncStreamingClient::StartReq, diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index b9d857c4826..44d525b1965 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -54,10 +54,10 @@ #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" -#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" #include "src/core/profiling/timers.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 500cc510188..12b9feed251 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -48,6 +48,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" using std::list; using std::thread; @@ -91,12 +92,12 @@ static ClientContext* AllocContext(list* contexts, T deadline) { } struct ServerData { - unique_ptr stub; + unique_ptr stub; unique_ptr> stream; }; struct ClientData { - unique_ptr stub; + unique_ptr stub; unique_ptr> stream; }; } // namespace runsc @@ -162,7 +163,7 @@ std::unique_ptr RunScenario( auto* servers = new ServerData[num_servers]; for (size_t i = 0; i < num_servers; i++) { servers[i].stub = - Worker::NewStub(CreateChannel(workers[i], InsecureCredentials())); + WorkerService::NewStub(CreateChannel(workers[i], InsecureCredentials())); ServerArgs args; result_server_config = server_config; result_server_config.set_host(workers[i]); @@ -189,7 +190,7 @@ std::unique_ptr RunScenario( // where class contained in std::vector must have a copy constructor auto* clients = new ClientData[num_clients]; for (size_t i = 0; i < num_clients; i++) { - clients[i].stub = Worker::NewStub( + clients[i].stub = WorkerService::NewStub( CreateChannel(workers[i + num_servers], InsecureCredentials())); ClientArgs args; result_client_config = client_config; @@ -211,9 +212,9 @@ std::unique_ptr RunScenario( // Start a run gpr_log(GPR_INFO, "Starting"); ServerArgs server_mark; - server_mark.mutable_mark(); + server_mark.mutable_mark()->set_reset(true); ClientArgs client_mark; - client_mark.mutable_mark(); + client_mark.mutable_mark()->set_reset(true); for (auto server = &servers[0]; server != &servers[num_servers]; server++) { GPR_ASSERT(server->stream->Write(server_mark)); } diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index 8ea9cb62e1a..f7cb30871d2 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -48,7 +48,7 @@ class Histogram { } Histogram(Histogram&& other) : impl_(other.impl_) { other.impl_ = nullptr; } - void Merge(Histogram* h) { gpr_histogram_merge(impl_, h->impl_); } + void Merge(const Histogram& h) { gpr_histogram_merge(impl_, h.impl_); } void Add(double value) { gpr_histogram_add(impl_, value); } double Percentile(double pctile) const { return gpr_histogram_percentile(impl_, pctile); diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 3d352b4996e..658cf873e84 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -72,8 +72,6 @@ DEFINE_double(determ_load, -1.0, "Deterministic offered load (qps)"); DEFINE_double(pareto_base, -1.0, "Pareto base interarrival time (us)"); DEFINE_double(pareto_alpha, -1.0, "Pareto alpha value"); -DEFINE_string(load_type, "CLOSED_LOOP", "Load type"); - using grpc::testing::ClientConfig; using grpc::testing::ServerConfig; using grpc::testing::ClientType; @@ -119,8 +117,8 @@ static void QpsDriver() { pareto->set_interarrival_base(FLAGS_pareto_base / 1e6); pareto->set_alpha(FLAGS_pareto_alpha); } else { - // Default is closed loop - // No need to set up any other load parameters here + client_config.mutable_load_params()->mutable_closed(); + // No further load parameters to set up for closed loop } ServerConfig server_config; diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index c3dbc255740..82850e5dbe4 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -58,6 +58,7 @@ static void RunQPS() { client_config.set_payload_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc index a7a11a615cc..153cbd7cea0 100644 --- a/test/cpp/qps/qps_test_with_poll.cc +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -62,6 +62,7 @@ static void RunQPS() { client_config.set_payload_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f16740b18d7..76b4c9b875f 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -52,10 +52,10 @@ #include #include "test/core/util/grpc_profiler.h" -#include "test/proto/perf_tests/perf_control.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" +#include "test/proto/perf_tests/perf_services.pb.h" namespace grpc { namespace testing { @@ -89,9 +89,9 @@ std::unique_ptr CreateServer(const ServerConfig& config, abort(); } -class WorkerImpl GRPC_FINAL : public Worker::Service { +class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { public: - explicit WorkerImpl(int server_port) + explicit WorkerServiceImpl(int server_port) : server_port_(server_port), acquired_(false) {} Status RunClient(ServerContext* ctx, @@ -126,7 +126,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { // Protect against multiple clients using this worker at once. class InstanceGuard { public: - InstanceGuard(WorkerImpl* impl) + InstanceGuard(WorkerServiceImpl* impl) : impl_(impl), acquired_(impl->TryAcquireInstance()) {} ~InstanceGuard() { if (acquired_) { @@ -137,7 +137,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { bool Acquired() const { return acquired_; } private: - WorkerImpl* const impl_; + WorkerServiceImpl* const impl_; const bool acquired_; }; @@ -175,7 +175,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { if (!args.has_mark()) { return Status(StatusCode::INVALID_ARGUMENT, ""); } - *status.mutable_stats() = client->Mark(); + *status.mutable_stats() = client->Mark(args.mark().reset()); stream->Write(status); } @@ -204,7 +204,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { if (!args.has_mark()) { return Status(StatusCode::INVALID_ARGUMENT, ""); } - *status.mutable_stats() = server->Mark(); + *status.mutable_stats() = server->Mark(args.mark().reset()); stream->Write(status); } @@ -218,7 +218,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { }; QpsWorker::QpsWorker(int driver_port, int server_port) { - impl_.reset(new WorkerImpl(server_port)); + impl_.reset(new WorkerServiceImpl(server_port)); char* server_address = NULL; gpr_join_host_port(&server_address, "::", driver_port); diff --git a/test/cpp/qps/qps_worker.h b/test/cpp/qps/qps_worker.h index 861588907ec..d5a7d7df1c5 100644 --- a/test/cpp/qps/qps_worker.h +++ b/test/cpp/qps/qps_worker.h @@ -42,7 +42,7 @@ class Server; namespace testing { -class WorkerImpl; +class WorkerServiceImpl; class QpsWorker { public: @@ -50,7 +50,7 @@ class QpsWorker { ~QpsWorker(); private: - std::unique_ptr impl_; + std::unique_ptr impl_; std::unique_ptr server_; }; diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index ba8394badc3..c99ef97564f 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -35,6 +35,7 @@ #define TEST_QPS_SERVER_H #include "test/cpp/qps/timer.h" +#include "test/proto/messages.grpc.pb.h" #include "test/proto/perf_tests/perf_control.grpc.pb.h" namespace grpc { @@ -45,11 +46,15 @@ class Server { Server() : timer_(new Timer) {} virtual ~Server() {} - ServerStats Mark() { - std::unique_ptr timer(new Timer); - timer.swap(timer_); - - auto timer_result = timer->Mark(); + ServerStats Mark(bool reset) { + Timer::Result timer_result; + if (reset) { + std::unique_ptr timer(new Timer); + timer.swap(timer_); + timer_result = timer->Mark(); + } else { + timer_result = timer_->Mark(); + } ServerStats stats; stats.set_time_elapsed(timer_result.wall); diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index db5218629af..2aee7294d4f 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -49,8 +49,8 @@ #include #include -#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" namespace grpc { namespace testing { @@ -76,10 +76,10 @@ class AsyncQpsServerTest : public Server { for (int i = 0; i < 10000 / config.threads(); i++) { for (int j = 0; j < config.threads(); j++) { auto request_unary = std::bind( - &TestService::AsyncService::RequestUnaryCall, &async_service_, _1, + &BenchmarkService::AsyncService::RequestUnaryCall, &async_service_, _1, _2, _3, srv_cqs_[j].get(), srv_cqs_[j].get(), _4); auto request_streaming = std::bind( - &TestService::AsyncService::RequestStreamingCall, &async_service_, + &BenchmarkService::AsyncService::RequestStreamingCall, &async_service_, _1, _2, srv_cqs_[j].get(), srv_cqs_[j].get(), _3); contexts_.push_front( new ServerRpcContextUnaryImpl( @@ -309,7 +309,7 @@ class AsyncQpsServerTest : public Server { std::vector threads_; std::unique_ptr server_; std::vector> srv_cqs_; - TestService::AsyncService async_service_; + BenchmarkService::AsyncService async_service_; std::forward_list contexts_; class PerThreadShutdownState { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 2b83548d19e..20da139826a 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -43,14 +43,14 @@ #include #include -#include "test/proto/perf_tests/perf_control.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" +#include "test/proto/perf_tests/perf_services.grpc.pb.h" namespace grpc { namespace testing { -class TestServiceImpl GRPC_FINAL : public TestService::Service { +class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service { public: Status UnaryCall(ServerContext* context, const SimpleRequest* request, SimpleResponse* response) GRPC_OVERRIDE { @@ -101,7 +101,7 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server { return builder.BuildAndStart(); } - TestServiceImpl service_; + BenchmarkServiceImpl service_; std::unique_ptr impl_; }; diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index 6dddb9ef228..ce10a87ab37 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -57,6 +57,7 @@ static void RunSynchronousStreamingPingPong() { client_config.set_client_channels(1); client_config.set_payload_size(1); client_config.set_rpc_type(STREAMING); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(SYNCHRONOUS_SERVER); diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 774e70e1977..c20e2c5ff0b 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -57,6 +57,7 @@ static void RunSynchronousUnaryPingPong() { client_config.set_client_channels(1); client_config.set_payload_size(1); client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed(); ServerConfig server_config; server_config.set_server_type(SYNCHRONOUS_SERVER); diff --git a/test/cpp/qps/timer.cc b/test/cpp/qps/timer.cc index 8edb838da37..3ec7f49f832 100644 --- a/test/cpp/qps/timer.cc +++ b/test/cpp/qps/timer.cc @@ -61,7 +61,7 @@ Timer::Result Timer::Sample() { return r; } -Timer::Result Timer::Mark() { +Timer::Result Timer::Mark() const { Result s = Sample(); Result r; r.wall = s.wall - start_.wall; diff --git a/test/cpp/qps/timer.h b/test/cpp/qps/timer.h index 30dbd7e7d50..d1aee1a9d19 100644 --- a/test/cpp/qps/timer.h +++ b/test/cpp/qps/timer.h @@ -44,7 +44,7 @@ class Timer { double system; }; - Result Mark(); + Result Mark() const; static double Now(); diff --git a/test/proto/perf_tests/perf_control.proto b/test/proto/perf_tests/perf_control.proto index 9c3e82285fc..bfdbfacb124 100644 --- a/test/proto/perf_tests/perf_control.proto +++ b/test/proto/perf_tests/perf_control.proto @@ -31,7 +31,6 @@ // of unary/streaming requests/responses. syntax = "proto3"; -import "test/proto/messages.proto"; import "test/proto/perf_tests/perf_stats.proto"; package grpc.testing; @@ -69,14 +68,16 @@ message ParetoParams { double alpha = 2; } +message ClosedLoopParams { +} + message LoadParams { oneof load { PoissonParams poisson = 1; UniformParams uniform = 2; DeterministicParams determ = 3; ParetoParams pareto = 4; - // No need to separately specify Closed-Loop as that - // will just be the absence of any of the above + ClosedLoopParams closed = 5; }; } @@ -100,6 +101,7 @@ message ClientStatus { // Request current stats message Mark { + bool reset = 1; } message ClientArgs { @@ -127,21 +129,3 @@ message ServerStatus { ServerStats stats = 1; int32 port = 2; } - -service TestService { - // One request followed by one response. - // The server returns the client payload as-is. - rpc UnaryCall(SimpleRequest) returns (SimpleResponse); - - // One request followed by one response. - // The server returns the client payload as-is. - rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); -} - -service Worker { - // Start server with specified workload - rpc RunServer(stream ServerArgs) returns (stream ServerStatus); - - // Start client with specified workload - rpc RunClient(stream ClientArgs) returns (stream ClientStatus); -} diff --git a/test/proto/perf_tests/perf_services.proto b/test/proto/perf_tests/perf_services.proto new file mode 100644 index 00000000000..f9497e2f758 --- /dev/null +++ b/test/proto/perf_tests/perf_services.proto @@ -0,0 +1,56 @@ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +import "test/proto/messages.proto"; +import "test/proto/perf_tests/perf_stats.proto"; +import "test/proto/perf_tests/perf_control.proto"; + +package grpc.testing; + +service BenchmarkService { + // One request followed by one response. + // The server returns the client payload as-is. + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // One request followed by one response. + // The server returns the client payload as-is. + rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); +} + +service WorkerService { + // Start server with specified workload + rpc RunServer(stream ServerArgs) returns (stream ServerStatus); + + // Start client with specified workload + rpc RunClient(stream ClientArgs) returns (stream ClientStatus); +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 60abb62e3a3..a3902cf3817 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -13660,6 +13660,8 @@ "test/proto/messages.pb.h", "test/proto/perf_tests/perf_control.grpc.pb.h", "test/proto/perf_tests/perf_control.pb.h", + "test/proto/perf_tests/perf_services.grpc.pb.h", + "test/proto/perf_tests/perf_services.pb.h", "test/proto/perf_tests/perf_stats.grpc.pb.h", "test/proto/perf_tests/perf_stats.pb.h" ], diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index e1987dba5dd..152ba7af6c5 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -163,6 +163,14 @@ + + + + + + + + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index f679ad4d543..8bbd5c35c2b 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -7,6 +7,9 @@ test\proto\perf_tests + + test\proto\perf_tests + test\proto\perf_tests From 72a633213815f19ac04b51331287e3f7b075dcc1 Mon Sep 17 00:00:00 2001 From: vjpai Date: Thu, 29 Oct 2015 02:23:11 -0700 Subject: [PATCH 08/18] QPS worker no longer needs to specify server port on command line. This is part of the proto if desired, or just goes to pick_unused_port_or_die if not specified --- test/cpp/qps/driver.cc | 3 +-- test/cpp/qps/qps_worker.cc | 20 ++++++++------------ test/cpp/qps/qps_worker.h | 2 +- test/cpp/qps/server.h | 16 ++++++++++++---- test/cpp/qps/server_async.cc | 10 +++++----- test/cpp/qps/server_sync.cc | 18 ++++++++---------- test/cpp/qps/single_run_localhost.sh | 4 ++-- test/cpp/qps/worker.cc | 5 ++--- test/proto/perf_tests/perf_control.proto | 1 + 9 files changed, 40 insertions(+), 39 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 12b9feed251..6c852769a59 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -132,8 +132,7 @@ std::unique_ptr RunScenario( } int driver_port = grpc_pick_unused_port_or_die(); - int benchmark_port = grpc_pick_unused_port_or_die(); - local_workers.emplace_back(new QpsWorker(driver_port, benchmark_port)); + local_workers.emplace_back(new QpsWorker(driver_port)); char addr[256]; sprintf(addr, "localhost:%d", driver_port); if (spawn_local_worker_count < 0) { diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 76b4c9b875f..cad2a9e0645 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -76,13 +76,12 @@ std::unique_ptr CreateClient(const ClientConfig& config) { abort(); } -std::unique_ptr CreateServer(const ServerConfig& config, - int server_port) { +std::unique_ptr CreateServer(const ServerConfig& config) { switch (config.server_type()) { case ServerType::SYNCHRONOUS_SERVER: - return CreateSynchronousServer(config, server_port); + return CreateSynchronousServer(config); case ServerType::ASYNC_SERVER: - return CreateAsyncServer(config, server_port); + return CreateAsyncServer(config); default: abort(); } @@ -91,8 +90,7 @@ std::unique_ptr CreateServer(const ServerConfig& config, class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { public: - explicit WorkerServiceImpl(int server_port) - : server_port_(server_port), acquired_(false) {} + explicit WorkerServiceImpl() : acquired_(false) {} Status RunClient(ServerContext* ctx, ServerReaderWriter* stream) @@ -191,12 +189,12 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { if (!args.has_setup()) { return Status(StatusCode::INVALID_ARGUMENT, ""); } - auto server = CreateServer(args.setup(), server_port_); + auto server = CreateServer(args.setup()); if (!server) { return Status(StatusCode::INVALID_ARGUMENT, ""); } ServerStatus status; - status.set_port(server_port_); + status.set_port(server->Port()); if (!stream->Write(status)) { return Status(StatusCode::UNKNOWN, ""); } @@ -211,14 +209,12 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { return Status::OK; } - const int server_port_; - std::mutex mu_; bool acquired_; }; -QpsWorker::QpsWorker(int driver_port, int server_port) { - impl_.reset(new WorkerServiceImpl(server_port)); +QpsWorker::QpsWorker(int driver_port) { + impl_.reset(new WorkerServiceImpl()); char* server_address = NULL; gpr_join_host_port(&server_address, "::", driver_port); diff --git a/test/cpp/qps/qps_worker.h b/test/cpp/qps/qps_worker.h index d5a7d7df1c5..0db88ad3d13 100644 --- a/test/cpp/qps/qps_worker.h +++ b/test/cpp/qps/qps_worker.h @@ -46,7 +46,7 @@ class WorkerServiceImpl; class QpsWorker { public: - QpsWorker(int driver_port, int server_port); + explicit QpsWorker(int driver_port); ~QpsWorker(); private: diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index c99ef97564f..3ea9382e509 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -34,6 +34,7 @@ #ifndef TEST_QPS_SERVER_H #define TEST_QPS_SERVER_H +#include "test/core/util/port.h" #include "test/cpp/qps/timer.h" #include "test/proto/messages.grpc.pb.h" #include "test/proto/perf_tests/perf_control.grpc.pb.h" @@ -43,7 +44,13 @@ namespace testing { class Server { public: - Server() : timer_(new Timer) {} + explicit Server(const ServerConfig& config) : timer_(new Timer) { + if (config.port()) { + port_ = config.port(); + } else { + port_ = grpc_pick_unused_port_or_die(); + } + } virtual ~Server() {} ServerStats Mark(bool reset) { @@ -75,13 +82,14 @@ class Server { return true; } + int Port() const {return port_;} private: + int port_; std::unique_ptr timer_; }; -std::unique_ptr CreateSynchronousServer(const ServerConfig& config, - int port); -std::unique_ptr CreateAsyncServer(const ServerConfig& config, int port); +std::unique_ptr CreateSynchronousServer(const ServerConfig& config); +std::unique_ptr CreateAsyncServer(const ServerConfig& config); } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 2aee7294d4f..2b3f7a38fb0 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -57,9 +57,10 @@ namespace testing { class AsyncQpsServerTest : public Server { public: - AsyncQpsServerTest(const ServerConfig &config, int port) { + explicit AsyncQpsServerTest(const ServerConfig &config): Server(config) { char *server_address = NULL; - gpr_join_host_port(&server_address, "::", port); + + gpr_join_host_port(&server_address, "::", Port()); ServerBuilder builder; builder.AddListeningPort(server_address, InsecureServerCredentials()); @@ -333,9 +334,8 @@ class AsyncQpsServerTest : public Server { std::vector> shutdown_state_; }; -std::unique_ptr CreateAsyncServer(const ServerConfig &config, - int port) { - return std::unique_ptr(new AsyncQpsServerTest(config, port)); +std::unique_ptr CreateAsyncServer(const ServerConfig& config) { + return std::unique_ptr(new AsyncQpsServerTest(config)); } } // namespace testing diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 20da139826a..3e7cf1d4cb3 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -84,30 +84,28 @@ class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service { class SynchronousServer GRPC_FINAL : public grpc::testing::Server { public: - SynchronousServer(const ServerConfig& config, int port) - : impl_(MakeImpl(port)) {} - - private: - std::unique_ptr MakeImpl(int port) { + explicit SynchronousServer(const ServerConfig& config) + : Server(config) { ServerBuilder builder; char* server_address = NULL; - gpr_join_host_port(&server_address, "::", port); + + gpr_join_host_port(&server_address, "::", Port()); builder.AddListeningPort(server_address, InsecureServerCredentials()); gpr_free(server_address); builder.RegisterService(&service_); - return builder.BuildAndStart(); + impl_ = builder.BuildAndStart(); } - + private: BenchmarkServiceImpl service_; std::unique_ptr impl_; }; std::unique_ptr CreateSynchronousServer( - const ServerConfig& config, int port) { - return std::unique_ptr(new SynchronousServer(config, port)); + const ServerConfig& config) { + return std::unique_ptr(new SynchronousServer(config)); } } // namespace testing diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh index 9d76f08f800..f5356f18343 100755 --- a/test/cpp/qps/single_run_localhost.sh +++ b/test/cpp/qps/single_run_localhost.sh @@ -42,9 +42,9 @@ NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count() make CONFIG=$config qps_worker qps_driver -j$NUMCPUS -bins/$config/qps_worker -driver_port 10000 -server_port 10001 & +bins/$config/qps_worker -driver_port 10000 & PID1=$! -bins/$config/qps_worker -driver_port 10010 -server_port 10011 & +bins/$config/qps_worker -driver_port 10010 & PID2=$! export QPS_WORKERS="localhost:10000,localhost:10010" diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 935e4853a62..430ffb7cdc2 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -43,8 +43,7 @@ #include "test/cpp/qps/qps_worker.h" #include "test/cpp/util/test_config.h" -DEFINE_int32(driver_port, 0, "Driver server port."); -DEFINE_int32(server_port, 0, "Spawned server port."); +DEFINE_int32(driver_port, 0, "Port for communication with driver"); static bool got_sigint = false; @@ -54,7 +53,7 @@ namespace grpc { namespace testing { static void RunServer() { - QpsWorker worker(FLAGS_driver_port, FLAGS_server_port); + QpsWorker worker(FLAGS_driver_port); while (!got_sigint) { gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), diff --git a/test/proto/perf_tests/perf_control.proto b/test/proto/perf_tests/perf_control.proto index bfdbfacb124..7a294233b76 100644 --- a/test/proto/perf_tests/perf_control.proto +++ b/test/proto/perf_tests/perf_control.proto @@ -116,6 +116,7 @@ message ServerConfig { int32 threads = 2; bool use_tls = 3; string host = 4; + int32 port = 5; } message ServerArgs { From aa39192d70ca4b9e0f63994c595545130b6c6224 Mon Sep 17 00:00:00 2001 From: vjpai Date: Mon, 2 Nov 2015 14:46:04 -0800 Subject: [PATCH 09/18] Cleanup directory and make minor changes --- Makefile | 66 +++++++++---------- build.yaml | 6 +- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/perf_db.proto | 2 +- .../control.proto} | 16 ++--- .../services.proto} | 3 +- .../stats.proto} | 0 tools/run_tests/sources_and_headers.json | 14 ++-- vsprojects/vcxproj/qps/qps.vcxproj | 24 +++---- vsprojects/vcxproj/qps/qps.vcxproj.filters | 16 ++--- 10 files changed, 74 insertions(+), 75 deletions(-) rename test/proto/{perf_tests/perf_control.proto => benchmarks/control.proto} (92%) rename test/proto/{perf_tests/perf_services.proto => benchmarks/services.proto} (95%) rename test/proto/{perf_tests/perf_stats.proto => benchmarks/stats.proto} (100%) diff --git a/Makefile b/Makefile index 06a984ad67b..39bf687f421 100644 --- a/Makefile +++ b/Makefile @@ -3753,75 +3753,75 @@ $(GENDIR)/test/cpp/util/messages.grpc.pb.cc: test/cpp/util/messages.proto $(PROT endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/empty.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/empty.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/control.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/empty.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/control.pb.cc: test/proto/benchmarks/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/empty.grpc.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc: test/proto/benchmarks/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/messages.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/messages.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/services.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/messages.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/services.pb.cc: test/proto/benchmarks/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc: test/proto/benchmarks/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/perf_tests/perf_control.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/stats.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/perf_tests/perf_control.pb.cc: test/proto/perf_tests/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/stats.pb.cc: test/proto/benchmarks/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc: test/proto/perf_tests/perf_control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc: test/proto/benchmarks/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/perf_tests/perf_services.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/empty.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/empty.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/perf_tests/perf_services.pb.cc: test/proto/perf_tests/perf_services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/empty.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc: test/proto/perf_tests/perf_services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/empty.grpc.pb.cc: test/proto/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc: protoc_dep_error -$(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/messages.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/messages.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc: test/proto/perf_tests/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/messages.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc: test/proto/perf_tests/perf_stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< @@ -5419,9 +5419,9 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ - $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc \ - $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc \ - $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc \ + $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc \ + $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc \ + $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ @@ -5476,16 +5476,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.pb.cc $(GENDIR)/test/proto/perf_tests/perf_control.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.pb.cc $(GENDIR)/test/proto/perf_tests/perf_services.grpc.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.pb.cc $(GENDIR)/test/proto/perf_tests/perf_stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index c8240bb53d3..55618182b17 100644 --- a/build.yaml +++ b/build.yaml @@ -752,9 +752,9 @@ libs: - test/cpp/util/benchmark_config.h src: - test/proto/messages.proto - - test/proto/perf_tests/perf_control.proto - - test/proto/perf_tests/perf_services.proto - - test/proto/perf_tests/perf_stats.proto + - test/proto/benchmarks/control.proto + - test/proto/benchmarks/services.proto + - test/proto/benchmarks/stats.proto - test/cpp/qps/perf_db.proto - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index f7cb30871d2..35527d2a2cb 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -35,7 +35,7 @@ #define TEST_QPS_HISTOGRAM_H #include -#include "test/proto/perf_tests/perf_stats.grpc.pb.h" +#include "test/proto/benchmarks/stats.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db.proto b/test/cpp/qps/perf_db.proto index 42334e36abb..8a691ddded4 100644 --- a/test/cpp/qps/perf_db.proto +++ b/test/cpp/qps/perf_db.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "test/proto/perf_tests/perf_control.proto"; +import "test/proto/benchmarks/control.proto"; package grpc.testing; diff --git a/test/proto/perf_tests/perf_control.proto b/test/proto/benchmarks/control.proto similarity index 92% rename from test/proto/perf_tests/perf_control.proto rename to test/proto/benchmarks/control.proto index 7a294233b76..e0fe8c0d26b 100644 --- a/test/proto/perf_tests/perf_control.proto +++ b/test/proto/benchmarks/control.proto @@ -31,17 +31,17 @@ // of unary/streaming requests/responses. syntax = "proto3"; -import "test/proto/perf_tests/perf_stats.proto"; +import "test/proto/benchmarks/stats.proto"; package grpc.testing; enum ClientType { - SYNCHRONOUS_CLIENT = 0; + SYNC_CLIENT = 0; ASYNC_CLIENT = 1; } enum ServerType { - SYNCHRONOUS_SERVER = 0; + SYNC_SERVER = 0; ASYNC_SERVER = 1; } @@ -73,11 +73,11 @@ message ClosedLoopParams { message LoadParams { oneof load { - PoissonParams poisson = 1; - UniformParams uniform = 2; - DeterministicParams determ = 3; - ParetoParams pareto = 4; - ClosedLoopParams closed = 5; + ClosedLoopParams closed_loop = 1; + PoissonParams poisson = 2; + UniformParams uniform = 3; + DeterministicParams determ = 4; + ParetoParams pareto = 5; }; } diff --git a/test/proto/perf_tests/perf_services.proto b/test/proto/benchmarks/services.proto similarity index 95% rename from test/proto/perf_tests/perf_services.proto rename to test/proto/benchmarks/services.proto index f9497e2f758..4c2cbabdf87 100644 --- a/test/proto/perf_tests/perf_services.proto +++ b/test/proto/benchmarks/services.proto @@ -32,8 +32,7 @@ syntax = "proto3"; import "test/proto/messages.proto"; -import "test/proto/perf_tests/perf_stats.proto"; -import "test/proto/perf_tests/perf_control.proto"; +import "test/proto/benchmarks/control.proto"; package grpc.testing; diff --git a/test/proto/perf_tests/perf_stats.proto b/test/proto/benchmarks/stats.proto similarity index 100% rename from test/proto/perf_tests/perf_stats.proto rename to test/proto/benchmarks/stats.proto diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index a90dfcb22c1..8def62aaa81 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -14649,14 +14649,14 @@ "test/cpp/qps/stats.h", "test/cpp/qps/timer.h", "test/cpp/util/benchmark_config.h", + "test/proto/benchmarks/control.grpc.pb.h", + "test/proto/benchmarks/control.pb.h", + "test/proto/benchmarks/services.grpc.pb.h", + "test/proto/benchmarks/services.pb.h", + "test/proto/benchmarks/stats.grpc.pb.h", + "test/proto/benchmarks/stats.pb.h", "test/proto/messages.grpc.pb.h", - "test/proto/messages.pb.h", - "test/proto/perf_tests/perf_control.grpc.pb.h", - "test/proto/perf_tests/perf_control.pb.h", - "test/proto/perf_tests/perf_services.grpc.pb.h", - "test/proto/perf_tests/perf_services.pb.h", - "test/proto/perf_tests/perf_stats.grpc.pb.h", - "test/proto/perf_tests/perf_stats.pb.h" + "test/proto/messages.pb.h" ], "language": "c++", "name": "qps", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 152ba7af6c5..3a851939e27 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -155,29 +155,29 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index 8bbd5c35c2b..0b9c2cb8337 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -4,14 +4,14 @@ test\proto - - test\proto\perf_tests + + test\proto\benchmarks - - test\proto\perf_tests + + test\proto\benchmarks - - test\proto\perf_tests + + test\proto\benchmarks test\cpp\qps @@ -99,8 +99,8 @@ {44e63a33-67f4-0575-e87a-711a7c9111e2} - - {cf788def-630c-8a5f-9a8c-6abdd500d712} + + {4180a094-39b4-e46c-1576-940bfe87d284} From d08a738166e7f293d4590bc852e102ebcbd2239d Mon Sep 17 00:00:00 2001 From: vjpai Date: Mon, 2 Nov 2015 16:45:08 -0800 Subject: [PATCH 10/18] Cleanup some names Remove some unused options and make server_threads relevant Start stubbing out better qps/core calculations --- .../cpp/qps/async_streaming_ping_pong_test.cc | 4 ++-- test/cpp/qps/async_unary_ping_pong_test.cc | 4 ++-- test/cpp/qps/client.h | 4 ++-- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.cc | 15 ++++++++------- test/cpp/qps/driver.h | 8 +++++--- test/cpp/qps/qps-sweep.sh | 4 ++-- test/cpp/qps/qps_driver.cc | 19 +++++-------------- test/cpp/qps/qps_openloop_test.cc | 2 +- test/cpp/qps/qps_test.cc | 4 ++-- test/cpp/qps/qps_worker.cc | 17 ++++++++++++----- test/cpp/qps/report.cc | 7 ++++--- test/cpp/qps/server.h | 5 ++++- test/cpp/qps/server_async.cc | 12 ++++++------ test/cpp/qps/server_sync.cc | 2 +- test/cpp/qps/sync_streaming_ping_pong_test.cc | 7 +++---- test/cpp/qps/sync_unary_ping_pong_test.cc | 7 +++---- test/proto/benchmarks/control.proto | 14 ++++++++------ 19 files changed, 72 insertions(+), 67 deletions(-) diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index e3a614e7433..c66aa19e18a 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -58,12 +58,12 @@ static void RunAsyncStreamingPingPong() { client_config.set_payload_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(STREAMING); - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(1); + server_config.set_async_server_threads(1); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index caed835325e..efc599d6986 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -58,12 +58,12 @@ static void RunAsyncUnaryPingPong() { client_config.set_payload_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(UNARY); - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(1); + server_config.set_async_server_threads(1); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 110249bd259..961e714fa82 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -41,7 +41,7 @@ #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" namespace grpc { @@ -171,7 +171,7 @@ class Client { } else if (load.has_pareto()) { random_dist.reset(new ParetoDist(load.pareto().interarrival_base() * num_threads, load.pareto().alpha())); - } else if (load.has_closed()) { + } else if (load.has_closed_loop()) { // Closed-loop doesn't use random dist at all } else { // invalid load type GPR_ASSERT(false); diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 41db6151c5a..b376f8501b2 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -51,7 +51,7 @@ #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 44d525b1965..10d680860a9 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -57,7 +57,7 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" #include "src/core/profiling/timers.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 6c852769a59..2803991b421 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -48,7 +48,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" using std::list; using std::thread; @@ -165,7 +165,6 @@ std::unique_ptr RunScenario( WorkerService::NewStub(CreateChannel(workers[i], InsecureCredentials())); ServerArgs args; result_server_config = server_config; - result_server_config.set_host(workers[i]); *args.mutable_setup() = server_config; servers[i].stream = servers[i].stub->RunServer(runsc::AllocContext(&contexts, deadline)); @@ -193,7 +192,6 @@ std::unique_ptr RunScenario( CreateChannel(workers[i + num_servers], InsecureCredentials())); ClientArgs args; result_client_config = client_config; - result_client_config.set_host(workers[i + num_servers]); *args.mutable_setup() = client_config; clients[i].stream = clients[i].stub->RunClient(runsc::AllocContext(&contexts, deadline)); @@ -250,15 +248,18 @@ std::unique_ptr RunScenario( for (auto server = &servers[0]; server != &servers[num_servers]; server++) { GPR_ASSERT(server->stream->Read(&server_status)); const auto& stats = server_status.stats(); - result->server_resources.emplace_back( - stats.time_elapsed(), stats.time_user(), stats.time_system()); + result->server_resources.emplace_back(stats.time_elapsed(), + stats.time_user(), + stats.time_system(), + server_status.cores()); } for (auto client = &clients[0]; client != &clients[num_clients]; client++) { GPR_ASSERT(client->stream->Read(&client_status)); const auto& stats = client_status.stats(); result->latencies.MergeProto(stats.latencies()); - result->client_resources.emplace_back( - stats.time_elapsed(), stats.time_user(), stats.time_system()); + result->client_resources.emplace_back(stats.time_elapsed(), + stats.time_user(), + stats.time_system(), -1); } for (auto client = &clients[0]; client != &clients[num_clients]; client++) { diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 7f69c013b70..50c0ba63a11 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -37,22 +37,24 @@ #include #include "test/cpp/qps/histogram.h" -#include "test/proto/perf_tests/perf_control.grpc.pb.h" +#include "test/proto/benchmarks/control.grpc.pb.h" namespace grpc { namespace testing { class ResourceUsage { public: - ResourceUsage(double w, double u, double s) - : wall_time_(w), user_time_(u), system_time_(s) {} + ResourceUsage(double w, double u, double s, int c) + : wall_time_(w), user_time_(u), system_time_(s), cores_(c) {} double wall_time() const { return wall_time_; } double user_time() const { return user_time_; } double system_time() const { return system_time_; } + int cores() const { return cores_; } private: double wall_time_; double user_time_; double system_time_; + int cores_; }; struct ScenarioResult { diff --git a/test/cpp/qps/qps-sweep.sh b/test/cpp/qps/qps-sweep.sh index cb932019335..216e40820c4 100755 --- a/test/cpp/qps/qps-sweep.sh +++ b/test/cpp/qps/qps-sweep.sh @@ -39,9 +39,9 @@ bins=`find . .. ../.. ../../.. -name bins | head -1` for channels in 1 2 4 8 do - for client in SYNCHRONOUS_CLIENT ASYNC_CLIENT + for client in SYNC_CLIENT ASYNC_CLIENT do - for server in SYNCHRONOUS_SERVER ASYNC_SERVER + for server in SYNC_SERVER ASYNC_SERVER do for rpc in UNARY STREAMING do diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 658cf873e84..a314be6f69a 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -54,15 +54,15 @@ DEFINE_bool(use_tls, false, "Use TLS"); DEFINE_string(rpc_type, "UNARY", "Type of RPC: UNARY or STREAMING"); // Server config -DEFINE_int32(server_threads, 1, "Number of server threads"); -DEFINE_string(server_type, "SYNCHRONOUS_SERVER", "Server type"); +DEFINE_int32(async_server_threads, 1, "Number of threads for async servers"); +DEFINE_string(server_type, "SYNC_SERVER", "Server type"); // Client config DEFINE_int32(outstanding_rpcs_per_channel, 1, "Number of outstanding rpcs per channel"); DEFINE_int32(client_channels, 1, "Number of client channels"); DEFINE_int32(payload_size, 1, "Payload size"); -DEFINE_string(client_type, "SYNCHRONOUS_CLIENT", "Client type"); +DEFINE_string(client_type, "SYNC_CLIENT", "Client type"); DEFINE_int32(async_client_threads, 1, "Async client threads"); DEFINE_double(poisson_load, -1.0, "Poisson offered load (qps)"); @@ -117,23 +117,14 @@ static void QpsDriver() { pareto->set_interarrival_base(FLAGS_pareto_base / 1e6); pareto->set_alpha(FLAGS_pareto_alpha); } else { - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); // No further load parameters to set up for closed loop } ServerConfig server_config; server_config.set_server_type(server_type); - server_config.set_threads(FLAGS_server_threads); server_config.set_use_tls(FLAGS_use_tls); - - // If we're running a sync-server streaming test, make sure - // that we have at least as many threads as the active streams - // or else threads will be blocked from forward progress and the - // client will deadlock on a timer. - GPR_ASSERT(!(server_type == grpc::testing::SYNCHRONOUS_SERVER && - rpc_type == grpc::testing::STREAMING && - FLAGS_server_threads < - FLAGS_client_channels * FLAGS_outstanding_rpcs_per_channel)); + server_config.set_async_server_threads(FLAGS_async_server_threads); const auto result = RunScenario( client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 918381b8509..d9f5ffc2efd 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -64,7 +64,7 @@ static void RunQPS() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(4); + server_config.set_async_server_threads(4); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index 82850e5dbe4..770a0d4ebf4 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -58,12 +58,12 @@ static void RunQPS() { client_config.set_payload_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(8); + server_config.set_async_server_threads(8); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index cad2a9e0645..0b34daec63f 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -55,14 +55,14 @@ #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" -#include "test/proto/perf_tests/perf_services.pb.h" +#include "test/proto/benchmarks/services.pb.h" namespace grpc { namespace testing { -std::unique_ptr CreateClient(const ClientConfig& config) { +static std::unique_ptr CreateClient(const ClientConfig& config) { switch (config.client_type()) { - case ClientType::SYNCHRONOUS_CLIENT: + case ClientType::SYNC_CLIENT: return (config.rpc_type() == RpcType::UNARY) ? CreateSynchronousUnaryClient(config) : CreateSynchronousStreamingClient(config); @@ -76,9 +76,15 @@ std::unique_ptr CreateClient(const ClientConfig& config) { abort(); } -std::unique_ptr CreateServer(const ServerConfig& config) { +static void LimitCores(int cores) { +} + +static std::unique_ptr CreateServer(const ServerConfig& config) { + if (config.core_limit() > 0) { + LimitCores(config.core_limit()); + } switch (config.server_type()) { - case ServerType::SYNCHRONOUS_SERVER: + case ServerType::SYNC_SERVER: return CreateSynchronousServer(config); case ServerType::ASYNC_SERVER: return CreateAsyncServer(config); @@ -195,6 +201,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { } ServerStatus status; status.set_port(server->Port()); + status.set_cores(server->Cores()); if (!stream->Write(status)) { return Status(StatusCode::UNKNOWN, ""); } diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index e03e8e1fb08..b230eb441e8 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -43,6 +43,7 @@ namespace testing { static double WallTime(ResourceUsage u) { return u.wall_time(); } static double UserTime(ResourceUsage u) { return u.user_time(); } static double SystemTime(ResourceUsage u) { return u.system_time(); } +static int Cores(ResourceUsage u) { return u.cores(); } void CompositeReporter::add(std::unique_ptr reporter) { reporters_.emplace_back(std::move(reporter)); @@ -83,7 +84,7 @@ void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) { result.latencies.Count() / average(result.client_resources, WallTime); gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps, - qps / result.server_config.threads()); + qps / sum(result.server_resources, Cores)); } void GprLogReporter::ReportLatency(const ScenarioResult& result) { @@ -123,10 +124,10 @@ void PerfDbReporter::ReportQPSPerCore(const ScenarioResult& result) { auto qps = result.latencies.Count() / average(result.client_resources, WallTime); - auto qpsPerCore = qps / result.server_config.threads(); + auto qps_per_core = qps / sum(result.server_resources, Cores); perf_db_client_.setQps(qps); - perf_db_client_.setQpsPerCore(qpsPerCore); + perf_db_client_.setQpsPerCore(qps_per_core); perf_db_client_.setConfigs(result.client_config, result.server_config); } diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 3ea9382e509..12bbf1fef65 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -34,10 +34,12 @@ #ifndef TEST_QPS_SERVER_H #define TEST_QPS_SERVER_H +#include + #include "test/core/util/port.h" #include "test/cpp/qps/timer.h" #include "test/proto/messages.grpc.pb.h" -#include "test/proto/perf_tests/perf_control.grpc.pb.h" +#include "test/proto/benchmarks/control.grpc.pb.h" namespace grpc { namespace testing { @@ -83,6 +85,7 @@ class Server { } int Port() const {return port_;} + int Cores() const {return gpr_cpu_num_cores();} private: int port_; std::unique_ptr timer_; diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 2b3f7a38fb0..b4b397afa82 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -50,7 +50,7 @@ #include #include "test/cpp/qps/server.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" namespace grpc { namespace testing { @@ -67,15 +67,15 @@ class AsyncQpsServerTest : public Server { gpr_free(server_address); builder.RegisterAsyncService(&async_service_); - for (int i = 0; i < config.threads(); i++) { + for (int i = 0; i < config.async_server_threads(); i++) { srv_cqs_.emplace_back(builder.AddCompletionQueue()); } server_ = builder.BuildAndStart(); using namespace std::placeholders; - for (int i = 0; i < 10000 / config.threads(); i++) { - for (int j = 0; j < config.threads(); j++) { + for (int i = 0; i < 10000 / config.async_server_threads(); i++) { + for (int j = 0; j < config.async_server_threads(); j++) { auto request_unary = std::bind( &BenchmarkService::AsyncService::RequestUnaryCall, &async_service_, _1, _2, _3, srv_cqs_[j].get(), srv_cqs_[j].get(), _4); @@ -90,10 +90,10 @@ class AsyncQpsServerTest : public Server { request_streaming, ProcessRPC)); } } - for (int i = 0; i < config.threads(); i++) { + for (int i = 0; i < config.async_server_threads(); i++) { shutdown_state_.emplace_back(new PerThreadShutdownState()); } - for (int i = 0; i < config.threads(); i++) { + for (int i = 0; i < config.async_server_threads(); i++) { threads_.emplace_back(&AsyncQpsServerTest::ThreadFunc, this, i); } } diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 3e7cf1d4cb3..feca7e2ac24 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -45,7 +45,7 @@ #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" -#include "test/proto/perf_tests/perf_services.grpc.pb.h" +#include "test/proto/benchmarks/services.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index ce10a87ab37..dd3be736859 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -51,18 +51,17 @@ static void RunSynchronousStreamingPingPong() { gpr_log(GPR_INFO, "Running Synchronous Streaming Ping Pong"); ClientConfig client_config; - client_config.set_client_type(SYNCHRONOUS_CLIENT); + client_config.set_client_type(SYNC_CLIENT); client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); client_config.set_rpc_type(STREAMING); - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; - server_config.set_server_type(SYNCHRONOUS_SERVER); + server_config.set_server_type(SYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(1); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index c20e2c5ff0b..2c1d2aa764e 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -51,18 +51,17 @@ static void RunSynchronousUnaryPingPong() { gpr_log(GPR_INFO, "Running Synchronous Unary Ping Pong"); ClientConfig client_config; - client_config.set_client_type(SYNCHRONOUS_CLIENT); + client_config.set_client_type(SYNC_CLIENT); client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); client_config.set_payload_size(1); client_config.set_rpc_type(UNARY); - client_config.mutable_load_params()->mutable_closed(); + client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; - server_config.set_server_type(SYNCHRONOUS_SERVER); + server_config.set_server_type(SYNC_SERVER); server_config.set_use_tls(false); - server_config.set_threads(1); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/proto/benchmarks/control.proto b/test/proto/benchmarks/control.proto index e0fe8c0d26b..50c2a31633a 100644 --- a/test/proto/benchmarks/control.proto +++ b/test/proto/benchmarks/control.proto @@ -91,8 +91,7 @@ message ClientConfig { // only for async client: int32 async_client_threads = 7; RpcType rpc_type = 8; - string host = 9; - LoadParams load_params = 11; + LoadParams load_params = 10; } message ClientStatus { @@ -113,10 +112,12 @@ message ClientArgs { message ServerConfig { ServerType server_type = 1; - int32 threads = 2; - bool use_tls = 3; - string host = 4; - int32 port = 5; + bool use_tls = 2; + int32 port = 4; + // only for async server + int32 async_server_threads = 7; + // restrict core usage + int32 core_limit = 8; } message ServerArgs { @@ -129,4 +130,5 @@ message ServerArgs { message ServerStatus { ServerStats stats = 1; int32 port = 2; + int32 cores = 3; } From 780a7f205d81eb4a63a4040329b527c3082fbf79 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 00:19:09 -0800 Subject: [PATCH 11/18] Add in security support, make payload protos configurable Have not yet added tests with security support, coming soon --- Makefile | 36 ++++++-- build.yaml | 1 + .../cpp/qps/async_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/async_unary_ping_pong_test.cc | 4 +- test/cpp/qps/client.h | 23 ++++- test/cpp/qps/qps_driver.cc | 22 ++++- test/cpp/qps/qps_openloop_test.cc | 4 +- test/cpp/qps/qps_test.cc | 4 +- test/cpp/qps/qps_test_with_poll.cc | 91 ------------------- test/cpp/qps/server.h | 14 +++ test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- test/cpp/qps/sync_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/sync_unary_ping_pong_test.cc | 4 +- test/proto/benchmarks/control.proto | 16 +++- test/proto/benchmarks/payloads.proto | 56 ++++++++++++ test/proto/benchmarks/stats.proto | 2 - tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/qps/qps.vcxproj | 8 ++ vsprojects/vcxproj/qps/qps.vcxproj.filters | 3 + 20 files changed, 166 insertions(+), 136 deletions(-) delete mode 100644 test/cpp/qps/qps_test_with_poll.cc create mode 100644 test/proto/benchmarks/payloads.proto diff --git a/Makefile b/Makefile index 39bf687f421..9e2b5e0b10f 100644 --- a/Makefile +++ b/Makefile @@ -3767,6 +3767,21 @@ $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc: test/proto/benchmarks/contro $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/test/proto/benchmarks/payloads.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc: protoc_dep_error +else +$(GENDIR)/test/proto/benchmarks/payloads.pb.cc: test/proto/benchmarks/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + +$(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc: test/proto/benchmarks/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/test/proto/benchmarks/services.pb.cc: protoc_dep_error $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc: protoc_dep_error @@ -5420,6 +5435,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \ $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc \ + $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc \ $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc \ $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ @@ -5476,16 +5492,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/control.pb.cc $(GENDIR)/test/proto/benchmarks/control.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.pb.cc $(GENDIR)/test/proto/benchmarks/payloads.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/services.pb.cc $(GENDIR)/test/proto/benchmarks/services.grpc.pb.cc $(GENDIR)/test/proto/benchmarks/stats.pb.cc $(GENDIR)/test/proto/benchmarks/stats.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index 55618182b17..fba87cc07a4 100644 --- a/build.yaml +++ b/build.yaml @@ -753,6 +753,7 @@ libs: src: - test/proto/messages.proto - test/proto/benchmarks/control.proto + - test/proto/benchmarks/payloads.proto - test/proto/benchmarks/services.proto - test/proto/benchmarks/stats.proto - test/cpp/qps/perf_db.proto diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index c66aa19e18a..338eebe356f 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -52,17 +52,15 @@ static void RunAsyncStreamingPingPong() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_use_tls(false); server_config.set_async_server_threads(1); const auto result = diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index efc599d6986..c17ea6c2cc0 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -52,17 +52,15 @@ static void RunAsyncUnaryPingPong() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_use_tls(false); server_config.set_async_server_threads(1); const auto result = diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 961e714fa82..507642b284b 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -41,6 +41,7 @@ #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" #include "test/cpp/util/create_test_channel.h" +#include "test/proto/benchmarks/payloads.grpc.pb.h" #include "test/proto/benchmarks/services.grpc.pb.h" namespace grpc { @@ -75,8 +76,20 @@ class Client { channels_[i].init(config.server_targets(i % config.server_targets_size()), config); } - request_.set_response_type(grpc::testing::PayloadType::COMPRESSABLE); - request_.set_response_size(config.payload_size()); + if (config.payload_config().has_bytebuf_params()) { + GPR_ASSERT(false); // not yet implemented + } else if (config.payload_config().has_simple_params()) { + request_.set_response_type(grpc::testing::PayloadType::COMPRESSABLE); + request_.set_response_size(config.payload_config().simple_params().resp_size()); + request_.mutable_payload()->set_type(grpc::testing::PayloadType::COMPRESSABLE); + int size = config.payload_config().simple_params().req_size(); + std::unique_ptr body(new char[size]); + request_.mutable_payload()->set_body(body.get(), size); + } else if (config.payload_config().has_complex_params()) { + GPR_ASSERT(false); // not yet implemented + } else { + GPR_ASSERT(false); // badly configured + } } virtual ~Client() {} @@ -131,7 +144,11 @@ class Client { // We have to use a 2-phase init like this with a default // constructor followed by an initializer function to make // old compilers happy with using this in std::vector - channel_ = CreateTestChannel(target, config.use_tls()); + channel_ = + CreateTestChannel(target, + config.security_params().server_host_override(), + config.has_security_params(), + !config.security_params().use_test_ca()); stub_ = BenchmarkService::NewStub(channel_); } Channel* get_channel() { return channel_.get(); } diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index a314be6f69a..e5d60d90e48 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -50,7 +50,6 @@ DEFINE_int32(benchmark_seconds, 30, "Benchmark time (in seconds)"); DEFINE_int32(local_workers, 0, "Number of local workers to start"); // Common config -DEFINE_bool(use_tls, false, "Use TLS"); DEFINE_string(rpc_type, "UNARY", "Type of RPC: UNARY or STREAMING"); // Server config @@ -61,7 +60,10 @@ DEFINE_string(server_type, "SYNC_SERVER", "Server type"); DEFINE_int32(outstanding_rpcs_per_channel, 1, "Number of outstanding rpcs per channel"); DEFINE_int32(client_channels, 1, "Number of client channels"); -DEFINE_int32(payload_size, 1, "Payload size"); + +DEFINE_int32(simple_req_size, -1, "Simple proto request payload size"); +DEFINE_int32(simple_resp_size, -1, "Simple proto response payload size"); + DEFINE_string(client_type, "SYNC_CLIENT", "Client type"); DEFINE_int32(async_client_threads, 1, "Async client threads"); @@ -93,11 +95,22 @@ static void QpsDriver() { ClientConfig client_config; client_config.set_client_type(client_type); - client_config.set_use_tls(FLAGS_use_tls); client_config.set_outstanding_rpcs_per_channel( FLAGS_outstanding_rpcs_per_channel); client_config.set_client_channels(FLAGS_client_channels); - client_config.set_payload_size(FLAGS_payload_size); + + // Decide which type to use based on the response type + if (FLAGS_simple_resp_size >= 0) { + auto params = client_config.mutable_payload_config()->mutable_simple_params(); + params->set_resp_size(FLAGS_simple_resp_size); + if (FLAGS_simple_req_size >= 0) { + params->set_req_size(FLAGS_simple_req_size); + } + } else { + GPR_ASSERT(false); // not yet implemented + } + + client_config.set_async_client_threads(FLAGS_async_client_threads); client_config.set_rpc_type(rpc_type); @@ -123,7 +136,6 @@ static void QpsDriver() { ServerConfig server_config; server_config.set_server_type(server_type); - server_config.set_use_tls(FLAGS_use_tls); server_config.set_async_server_threads(FLAGS_async_server_threads); const auto result = RunScenario( diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index d9f5ffc2efd..c867714ad0d 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -52,10 +52,9 @@ static void RunQPS() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_poisson()->set_offered_load( @@ -63,7 +62,6 @@ static void RunQPS() { ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_use_tls(false); server_config.set_async_server_threads(4); const auto result = diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index 770a0d4ebf4..c51663a95ba 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -52,17 +52,15 @@ static void RunQPS() { ClientConfig client_config; client_config.set_client_type(ASYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(ASYNC_SERVER); - server_config.set_use_tls(false); server_config.set_async_server_threads(8); const auto result = diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc deleted file mode 100644 index 153cbd7cea0..00000000000 --- a/test/cpp/qps/qps_test_with_poll.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include - -#include - -#include "test/cpp/qps/driver.h" -#include "test/cpp/qps/report.h" -#include "test/cpp/util/benchmark_config.h" - -extern "C" { -#include "src/core/iomgr/pollset_posix.h" -} - -namespace grpc { -namespace testing { - -static const int WARMUP = 5; -static const int BENCHMARK = 5; - -static void RunQPS() { - gpr_log(GPR_INFO, "Running QPS test"); - - ClientConfig client_config; - client_config.set_client_type(ASYNC_CLIENT); - client_config.set_use_tls(false); - client_config.set_outstanding_rpcs_per_channel(1000); - client_config.set_client_channels(8); - client_config.set_payload_size(1); - client_config.set_async_client_threads(8); - client_config.set_rpc_type(UNARY); - client_config.mutable_load_params()->mutable_closed(); - - ServerConfig server_config; - server_config.set_server_type(ASYNC_SERVER); - server_config.set_use_tls(false); - server_config.set_threads(4); - - const auto result = - RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - - GetReporter()->ReportQPSPerCore(*result); - GetReporter()->ReportLatency(*result); -} - -} // namespace testing -} // namespace grpc - -int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); - - grpc_platform_become_multipoller = grpc_poll_become_multipoller; - - signal(SIGPIPE, SIG_IGN); - grpc::testing::RunQPS(); - - return 0; -} diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 12bbf1fef65..f4ae9900220 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -35,7 +35,9 @@ #define TEST_QPS_SERVER_H #include +#include +#include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/cpp/qps/timer.h" #include "test/proto/messages.grpc.pb.h" @@ -86,6 +88,18 @@ class Server { int Port() const {return port_;} int Cores() const {return gpr_cpu_num_cores();} + static std::shared_ptr CreateServerCredentials(const ServerConfig &config) { + if (config.has_security_params()) { + SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, + test_server1_cert}; + SslServerCredentialsOptions ssl_opts; + ssl_opts.pem_root_certs = ""; + ssl_opts.pem_key_cert_pairs.push_back(pkcp); + return SslServerCredentials(ssl_opts); + } else { + return InsecureServerCredentials(); + } + } private: int port_; std::unique_ptr timer_; diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index b4b397afa82..fed59c04331 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -63,7 +63,7 @@ class AsyncQpsServerTest : public Server { gpr_join_host_port(&server_address, "::", Port()); ServerBuilder builder; - builder.AddListeningPort(server_address, InsecureServerCredentials()); + builder.AddListeningPort(server_address, Server::CreateServerCredentials(config)); gpr_free(server_address); builder.RegisterAsyncService(&async_service_); diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index feca7e2ac24..c235069e204 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -91,7 +91,7 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server { char* server_address = NULL; gpr_join_host_port(&server_address, "::", Port()); - builder.AddListeningPort(server_address, InsecureServerCredentials()); + builder.AddListeningPort(server_address, Server::CreateServerCredentials(config)); gpr_free(server_address); builder.RegisterService(&service_); diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index dd3be736859..8dbbec17e82 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -52,16 +52,14 @@ static void RunSynchronousStreamingPingPong() { ClientConfig client_config; client_config.set_client_type(SYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(SYNC_SERVER); - server_config.set_use_tls(false); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 2c1d2aa764e..909529ec614 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -52,16 +52,14 @@ static void RunSynchronousUnaryPingPong() { ClientConfig client_config; client_config.set_client_type(SYNC_CLIENT); - client_config.set_use_tls(false); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.set_payload_size(1); + client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); ServerConfig server_config; server_config.set_server_type(SYNC_SERVER); - server_config.set_use_tls(false); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/proto/benchmarks/control.proto b/test/proto/benchmarks/control.proto index 50c2a31633a..26a19ea0728 100644 --- a/test/proto/benchmarks/control.proto +++ b/test/proto/benchmarks/control.proto @@ -27,10 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. syntax = "proto3"; +import "test/proto/benchmarks/payloads.proto"; import "test/proto/benchmarks/stats.proto"; package grpc.testing; @@ -81,17 +80,23 @@ message LoadParams { }; } +// presence of SecurityParams implies use of TLS +message SecurityParams { + bool use_test_ca = 1; + string server_host_override = 2; +} + message ClientConfig { repeated string server_targets = 1; ClientType client_type = 2; - bool use_tls = 3; + SecurityParams security_params = 3; int32 outstanding_rpcs_per_channel = 4; int32 client_channels = 5; - int32 payload_size = 6; // only for async client: int32 async_client_threads = 7; RpcType rpc_type = 8; LoadParams load_params = 10; + PayloadConfig payload_config = 11; } message ClientStatus { @@ -112,12 +117,13 @@ message ClientArgs { message ServerConfig { ServerType server_type = 1; - bool use_tls = 2; + SecurityParams security_params = 2; int32 port = 4; // only for async server int32 async_server_threads = 7; // restrict core usage int32 core_limit = 8; + PayloadConfig payload_config = 9; } message ServerArgs { diff --git a/test/proto/benchmarks/payloads.proto b/test/proto/benchmarks/payloads.proto new file mode 100644 index 00000000000..ad6c08a4afb --- /dev/null +++ b/test/proto/benchmarks/payloads.proto @@ -0,0 +1,56 @@ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package grpc.testing; + +message ByteBufferParams { + int32 req_size = 1; + int32 resp_size = 2; +} + +message SimpleProtoParams { + int32 req_size = 1; + int32 resp_size = 2; +} + +message ComplexProtoParams { +// TODO (vpai): Fill this in once the details of complex, representative +// protos are decided +} + +message PayloadConfig { + oneof payload { + ByteBufferParams bytebuf_params = 1; + SimpleProtoParams simple_params = 2; + ComplexProtoParams complex_params = 3; + } +} + diff --git a/test/proto/benchmarks/stats.proto b/test/proto/benchmarks/stats.proto index 0a98465f3d9..670af33e037 100644 --- a/test/proto/benchmarks/stats.proto +++ b/test/proto/benchmarks/stats.proto @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. syntax = "proto3"; package grpc.testing; diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8def62aaa81..eb9a117733a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -14651,6 +14651,8 @@ "test/cpp/util/benchmark_config.h", "test/proto/benchmarks/control.grpc.pb.h", "test/proto/benchmarks/control.pb.h", + "test/proto/benchmarks/payloads.grpc.pb.h", + "test/proto/benchmarks/payloads.pb.h", "test/proto/benchmarks/services.grpc.pb.h", "test/proto/benchmarks/services.pb.h", "test/proto/benchmarks/stats.grpc.pb.h", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 3a851939e27..9c5a4da0081 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -163,6 +163,14 @@ + + + + + + + + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index 0b9c2cb8337..afa71953164 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -7,6 +7,9 @@ test\proto\benchmarks + + test\proto\benchmarks + test\proto\benchmarks From ce846706287e68e644eb611be71b1a02b252f043 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 4 Nov 2015 00:30:12 -0800 Subject: [PATCH 12/18] clang-format --- .../cpp/qps/async_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/async_unary_ping_pong_test.cc | 4 +- test/cpp/qps/client.h | 50 +++++----- test/cpp/qps/client_async.cc | 17 ++-- test/cpp/qps/driver.cc | 16 ++-- test/cpp/qps/driver.h | 2 +- test/cpp/qps/qps_driver.cc | 6 +- test/cpp/qps/qps_openloop_test.cc | 4 +- test/cpp/qps/qps_test.cc | 4 +- test/cpp/qps/qps_worker.cc | 7 +- test/cpp/qps/server.h | 10 +- test/cpp/qps/server_async.cc | 15 +-- test/cpp/qps/server_sync.cc | 7 +- test/cpp/qps/single_run_localhost.sh | 92 ++++++++++--------- test/cpp/qps/sync_streaming_ping_pong_test.cc | 4 +- test/cpp/qps/sync_unary_ping_pong_test.cc | 4 +- test/proto/benchmarks/control.proto | 4 +- test/proto/benchmarks/payloads.proto | 5 +- test/proto/benchmarks/stats.proto | 1 - 19 files changed, 140 insertions(+), 116 deletions(-) mode change 100755 => 100644 test/cpp/qps/single_run_localhost.sh diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index 338eebe356f..9aa7f88fa4d 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -54,7 +54,9 @@ static void RunAsyncStreamingPingPong() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index c17ea6c2cc0..fe2cde038a1 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -54,7 +54,9 @@ static void RunAsyncUnaryPingPong() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 507642b284b..027e0d4be0f 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -77,18 +77,20 @@ class Client { config); } if (config.payload_config().has_bytebuf_params()) { - GPR_ASSERT(false); // not yet implemented + GPR_ASSERT(false); // not yet implemented } else if (config.payload_config().has_simple_params()) { request_.set_response_type(grpc::testing::PayloadType::COMPRESSABLE); - request_.set_response_size(config.payload_config().simple_params().resp_size()); - request_.mutable_payload()->set_type(grpc::testing::PayloadType::COMPRESSABLE); + request_.set_response_size( + config.payload_config().simple_params().resp_size()); + request_.mutable_payload()->set_type( + grpc::testing::PayloadType::COMPRESSABLE); int size = config.payload_config().simple_params().req_size(); std::unique_ptr body(new char[size]); request_.mutable_payload()->set_body(body.get(), size); } else if (config.payload_config().has_complex_params()) { - GPR_ASSERT(false); // not yet implemented + GPR_ASSERT(false); // not yet implemented } else { - GPR_ASSERT(false); // badly configured + GPR_ASSERT(false); // badly configured } } virtual ~Client() {} @@ -101,20 +103,20 @@ class Client { if (reset) { Histogram* to_merge = new Histogram[threads_.size()]; for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->BeginSwap(&to_merge[i]); + threads_[i]->BeginSwap(&to_merge[i]); } std::unique_ptr timer(new Timer); timer_.swap(timer); for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->EndSwap(); - latencies.Merge(to_merge[i]); + threads_[i]->EndSwap(); + latencies.Merge(to_merge[i]); } delete[] to_merge; timer_result = timer->Mark(); } else { // merge snapshots of each thread histogram for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->MergeStatsInto(&latencies); + threads_[i]->MergeStatsInto(&latencies); } timer_result = timer_->Mark(); } @@ -144,11 +146,10 @@ class Client { // We have to use a 2-phase init like this with a default // constructor followed by an initializer function to make // old compilers happy with using this in std::vector - channel_ = - CreateTestChannel(target, - config.security_params().server_host_override(), - config.has_security_params(), - !config.security_params().use_test_ca()); + channel_ = CreateTestChannel( + target, config.security_params().server_host_override(), + config.has_security_params(), + !config.security_params().use_test_ca()); stub_ = BenchmarkService::NewStub(channel_); } Channel* get_channel() { return channel_.get(); } @@ -176,21 +177,22 @@ class Client { std::unique_ptr random_dist; if (load.has_poisson()) { - random_dist.reset(new ExpDist(load.poisson().offered_load() / - num_threads)); + random_dist.reset( + new ExpDist(load.poisson().offered_load() / num_threads)); } else if (load.has_uniform()) { - random_dist.reset(new UniformDist(load.uniform().interarrival_lo() * - num_threads, - load.uniform().interarrival_hi() * - num_threads)); + random_dist.reset( + new UniformDist(load.uniform().interarrival_lo() * num_threads, + load.uniform().interarrival_hi() * num_threads)); } else if (load.has_determ()) { - random_dist.reset(new DetDist(num_threads / load.determ().offered_load())); + random_dist.reset( + new DetDist(num_threads / load.determ().offered_load())); } else if (load.has_pareto()) { - random_dist.reset(new ParetoDist(load.pareto().interarrival_base() * num_threads, - load.pareto().alpha())); + random_dist.reset( + new ParetoDist(load.pareto().interarrival_base() * num_threads, + load.pareto().alpha())); } else if (load.has_closed_loop()) { // Closed-loop doesn't use random dist at all - } else { // invalid load type + } else { // invalid load type GPR_ASSERT(false); } diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index b376f8501b2..9594179822d 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -358,7 +358,8 @@ class AsyncUnaryClient GRPC_FINAL : public AsyncClient { const SimpleRequest& request, CompletionQueue* cq) { return stub->AsyncUnaryCall(ctx, request, cq); }; - static ClientRpcContext* SetupCtx(int channel_id, BenchmarkService::Stub* stub, + static ClientRpcContext* SetupCtx(int channel_id, + BenchmarkService::Stub* stub, const SimpleRequest& req) { return new ClientRpcContextUnaryImpl( channel_id, stub, req, AsyncUnaryClient::StartReq, @@ -371,9 +372,10 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { public: ClientRpcContextStreamingImpl( int channel_id, BenchmarkService::Stub* stub, const RequestType& req, - std::function>(BenchmarkService::Stub*, grpc::ClientContext*, - CompletionQueue*, void*)> start_req, + std::function>( + BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, + void*)> start_req, std::function on_done) : ClientRpcContext(channel_id), context_(), @@ -427,8 +429,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { std::function callback_; std::function< std::unique_ptr>( - BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)> - start_req_; + BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, + void*)> start_req_; grpc::Status status_; double start_; std::unique_ptr> @@ -456,7 +458,8 @@ class AsyncStreamingClient GRPC_FINAL : public AsyncClient { auto stream = stub->AsyncStreamingCall(ctx, cq, tag); return stream; }; - static ClientRpcContext* SetupCtx(int channel_id, BenchmarkService::Stub* stub, + static ClientRpcContext* SetupCtx(int channel_id, + BenchmarkService::Stub* stub, const SimpleRequest& req) { return new ClientRpcContextStreamingImpl( channel_id, stub, req, AsyncStreamingClient::StartReq, diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 2803991b421..2c6247deea1 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -161,8 +161,8 @@ std::unique_ptr RunScenario( // where class contained in std::vector must have a copy constructor auto* servers = new ServerData[num_servers]; for (size_t i = 0; i < num_servers; i++) { - servers[i].stub = - WorkerService::NewStub(CreateChannel(workers[i], InsecureCredentials())); + servers[i].stub = WorkerService::NewStub( + CreateChannel(workers[i], InsecureCredentials())); ServerArgs args; result_server_config = server_config; *args.mutable_setup() = server_config; @@ -248,18 +248,16 @@ std::unique_ptr RunScenario( for (auto server = &servers[0]; server != &servers[num_servers]; server++) { GPR_ASSERT(server->stream->Read(&server_status)); const auto& stats = server_status.stats(); - result->server_resources.emplace_back(stats.time_elapsed(), - stats.time_user(), - stats.time_system(), - server_status.cores()); + result->server_resources.emplace_back( + stats.time_elapsed(), stats.time_user(), stats.time_system(), + server_status.cores()); } for (auto client = &clients[0]; client != &clients[num_clients]; client++) { GPR_ASSERT(client->stream->Read(&client_status)); const auto& stats = client_status.stats(); result->latencies.MergeProto(stats.latencies()); - result->client_resources.emplace_back(stats.time_elapsed(), - stats.time_user(), - stats.time_system(), -1); + result->client_resources.emplace_back( + stats.time_elapsed(), stats.time_user(), stats.time_system(), -1); } for (auto client = &clients[0]; client != &clients[num_clients]; client++) { diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 50c0ba63a11..50bf17ceab2 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -44,7 +44,7 @@ namespace testing { class ResourceUsage { public: ResourceUsage(double w, double u, double s, int c) - : wall_time_(w), user_time_(u), system_time_(s), cores_(c) {} + : wall_time_(w), user_time_(u), system_time_(s), cores_(c) {} double wall_time() const { return wall_time_; } double user_time() const { return user_time_; } double system_time() const { return system_time_; } diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index e5d60d90e48..30795157cbb 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -101,16 +101,16 @@ static void QpsDriver() { // Decide which type to use based on the response type if (FLAGS_simple_resp_size >= 0) { - auto params = client_config.mutable_payload_config()->mutable_simple_params(); + auto params = + client_config.mutable_payload_config()->mutable_simple_params(); params->set_resp_size(FLAGS_simple_resp_size); if (FLAGS_simple_req_size >= 0) { params->set_req_size(FLAGS_simple_req_size); } } else { - GPR_ASSERT(false); // not yet implemented + GPR_ASSERT(false); // not yet implemented } - client_config.set_async_client_threads(FLAGS_async_client_threads); client_config.set_rpc_type(rpc_type); diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index c867714ad0d..fbd9558b5a2 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -54,7 +54,9 @@ static void RunQPS() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_poisson()->set_offered_load( diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index c51663a95ba..de81d99a37c 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -54,7 +54,9 @@ static void RunQPS() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 0b34daec63f..8af6fd0f16f 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -76,8 +76,7 @@ static std::unique_ptr CreateClient(const ClientConfig& config) { abort(); } -static void LimitCores(int cores) { -} +static void LimitCores(int cores) {} static std::unique_ptr CreateServer(const ServerConfig& config) { if (config.core_limit() > 0) { @@ -99,7 +98,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { explicit WorkerServiceImpl() : acquired_(false) {} Status RunClient(ServerContext* ctx, - ServerReaderWriter* stream) + ServerReaderWriter* stream) GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { @@ -159,7 +158,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { } Status RunClientBody(ServerContext* ctx, - ServerReaderWriter* stream) { + ServerReaderWriter* stream) { ClientArgs args; if (!stream->Read(&args)) { return Status(StatusCode::INVALID_ARGUMENT, ""); diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index f4ae9900220..0309cb5c20f 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -86,12 +86,13 @@ class Server { return true; } - int Port() const {return port_;} - int Cores() const {return gpr_cpu_num_cores();} - static std::shared_ptr CreateServerCredentials(const ServerConfig &config) { + int Port() const { return port_; } + int Cores() const { return gpr_cpu_num_cores(); } + static std::shared_ptr CreateServerCredentials( + const ServerConfig& config) { if (config.has_security_params()) { SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, - test_server1_cert}; + test_server1_cert}; SslServerCredentialsOptions ssl_opts; ssl_opts.pem_root_certs = ""; ssl_opts.pem_key_cert_pairs.push_back(pkcp); @@ -100,6 +101,7 @@ class Server { return InsecureServerCredentials(); } } + private: int port_; std::unique_ptr timer_; diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index fed59c04331..40f9dd3f46b 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -57,13 +57,14 @@ namespace testing { class AsyncQpsServerTest : public Server { public: - explicit AsyncQpsServerTest(const ServerConfig &config): Server(config) { + explicit AsyncQpsServerTest(const ServerConfig &config) : Server(config) { char *server_address = NULL; gpr_join_host_port(&server_address, "::", Port()); ServerBuilder builder; - builder.AddListeningPort(server_address, Server::CreateServerCredentials(config)); + builder.AddListeningPort(server_address, + Server::CreateServerCredentials(config)); gpr_free(server_address); builder.RegisterAsyncService(&async_service_); @@ -77,11 +78,11 @@ class AsyncQpsServerTest : public Server { for (int i = 0; i < 10000 / config.async_server_threads(); i++) { for (int j = 0; j < config.async_server_threads(); j++) { auto request_unary = std::bind( - &BenchmarkService::AsyncService::RequestUnaryCall, &async_service_, _1, - _2, _3, srv_cqs_[j].get(), srv_cqs_[j].get(), _4); + &BenchmarkService::AsyncService::RequestUnaryCall, &async_service_, + _1, _2, _3, srv_cqs_[j].get(), srv_cqs_[j].get(), _4); auto request_streaming = std::bind( - &BenchmarkService::AsyncService::RequestStreamingCall, &async_service_, - _1, _2, srv_cqs_[j].get(), srv_cqs_[j].get(), _3); + &BenchmarkService::AsyncService::RequestStreamingCall, + &async_service_, _1, _2, srv_cqs_[j].get(), srv_cqs_[j].get(), _3); contexts_.push_front( new ServerRpcContextUnaryImpl( request_unary, ProcessRPC)); @@ -334,7 +335,7 @@ class AsyncQpsServerTest : public Server { std::vector> shutdown_state_; }; -std::unique_ptr CreateAsyncServer(const ServerConfig& config) { +std::unique_ptr CreateAsyncServer(const ServerConfig &config) { return std::unique_ptr(new AsyncQpsServerTest(config)); } diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index c235069e204..9f06b44aece 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -84,20 +84,21 @@ class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service { class SynchronousServer GRPC_FINAL : public grpc::testing::Server { public: - explicit SynchronousServer(const ServerConfig& config) - : Server(config) { + explicit SynchronousServer(const ServerConfig& config) : Server(config) { ServerBuilder builder; char* server_address = NULL; gpr_join_host_port(&server_address, "::", Port()); - builder.AddListeningPort(server_address, Server::CreateServerCredentials(config)); + builder.AddListeningPort(server_address, + Server::CreateServerCredentials(config)); gpr_free(server_address); builder.RegisterService(&service_); impl_ = builder.BuildAndStart(); } + private: BenchmarkServiceImpl service_; std::unique_ptr impl_; diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh old mode 100755 new mode 100644 index f5356f18343..771cf0fd60a --- a/test/cpp/qps/single_run_localhost.sh +++ b/test/cpp/qps/single_run_localhost.sh @@ -1,56 +1,64 @@ -#!/bin/sh -# Copyright 2015, Google Inc. -# All rights reserved. +#!/ bin / sh +#Copyright 2015, Google Inc. +#All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: +#Redistribution and use in source and binary forms, with or without +#modification, are permitted provided that the following conditions are +#met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. +#* Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +#* Redistributions in binary form must reproduce the above +#copyright notice, this list of conditions and the following disclaimer +#in the documentation and / or other materials provided with the +#distribution. +#* Neither the name of Google Inc.nor the names of its +#contributors may be used to endorse or promote products derived from +#this software without specific prior written permission. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +#A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT +#OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT +#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# performs a single qps run with one client and one server +#performs a single qps run with one client and one server -set -ex +set - + ex -cd $(dirname $0)/../../.. + cd + $(dirname $0) / + ../../ + .. -killall qps_worker || true + killall qps_worker + || true -config=opt + config = opt -NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'` + NUMCPUS =`python2 .7 - c + 'import multiprocessing; print multiprocessing.cpu_count()'` -make CONFIG=$config qps_worker qps_driver -j$NUMCPUS + make CONFIG = $config qps_worker qps_driver - + j$NUMCPUS -bins/$config/qps_worker -driver_port 10000 & -PID1=$! -bins/$config/qps_worker -driver_port 10010 & -PID2=$! + bins + / $config / qps_worker + - driver_port + 10000 &PID1 = $ !bins / $config / qps_worker + - driver_port 10010 &PID2 = $ ! -export QPS_WORKERS="localhost:10000,localhost:10010" + export QPS_WORKERS = "localhost:10000,localhost:10010" -bins/$config/qps_driver $* - -kill -2 $PID1 $PID2 -wait + bins + / $config / qps_driver $ * + kill + - 2 $PID1 $PID2 wait diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index 8dbbec17e82..250e8eb7727 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -54,7 +54,9 @@ static void RunSynchronousStreamingPingPong() { client_config.set_client_type(SYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 909529ec614..4defcf30657 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -54,7 +54,9 @@ static void RunSynchronousUnaryPingPong() { client_config.set_client_type(SYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config()->mutable_simple_params()->set_resp_size(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); diff --git a/test/proto/benchmarks/control.proto b/test/proto/benchmarks/control.proto index 26a19ea0728..966ab78baae 100644 --- a/test/proto/benchmarks/control.proto +++ b/test/proto/benchmarks/control.proto @@ -82,8 +82,8 @@ message LoadParams { // presence of SecurityParams implies use of TLS message SecurityParams { - bool use_test_ca = 1; - string server_host_override = 2; + bool use_test_ca = 1; + string server_host_override = 2; } message ClientConfig { diff --git a/test/proto/benchmarks/payloads.proto b/test/proto/benchmarks/payloads.proto index ad6c08a4afb..7e5b2c61ff7 100644 --- a/test/proto/benchmarks/payloads.proto +++ b/test/proto/benchmarks/payloads.proto @@ -42,8 +42,8 @@ message SimpleProtoParams { } message ComplexProtoParams { -// TODO (vpai): Fill this in once the details of complex, representative -// protos are decided + // TODO (vpai): Fill this in once the details of complex, representative + // protos are decided } message PayloadConfig { @@ -53,4 +53,3 @@ message PayloadConfig { ComplexProtoParams complex_params = 3; } } - diff --git a/test/proto/benchmarks/stats.proto b/test/proto/benchmarks/stats.proto index 670af33e037..d52144f3214 100644 --- a/test/proto/benchmarks/stats.proto +++ b/test/proto/benchmarks/stats.proto @@ -57,4 +57,3 @@ message ClientStats { double time_user = 3; double time_system = 4; } - From 783c144afa7a38ca1abaf410b9b44cb465a11ed1 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 08:29:33 -0800 Subject: [PATCH 13/18] Fix up single run test Enable reasonable default if resp size not specified --- test/cpp/qps/qps_driver.cc | 5 +- test/cpp/qps/single_run_localhost.sh | 92 +++++++++++++--------------- 2 files changed, 46 insertions(+), 51 deletions(-) mode change 100644 => 100755 test/cpp/qps/single_run_localhost.sh diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 30795157cbb..ebbf931933e 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -108,7 +108,10 @@ static void QpsDriver() { params->set_req_size(FLAGS_simple_req_size); } } else { - GPR_ASSERT(false); // not yet implemented + // choose a reasonable default + auto params = + client_config.mutable_payload_config()->mutable_simple_params(); + params->set_resp_size(1); } client_config.set_async_client_threads(FLAGS_async_client_threads); diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh old mode 100644 new mode 100755 index 771cf0fd60a..f5356f18343 --- a/test/cpp/qps/single_run_localhost.sh +++ b/test/cpp/qps/single_run_localhost.sh @@ -1,64 +1,56 @@ -#!/ bin / sh -#Copyright 2015, Google Inc. -#All rights reserved. +#!/bin/sh +# Copyright 2015, Google Inc. +# All rights reserved. # -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions are -#met: +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: # -#* Redistributions of source code must retain the above copyright -#notice, this list of conditions and the following disclaimer. -#* Redistributions in binary form must reproduce the above -#copyright notice, this list of conditions and the following disclaimer -#in the documentation and / or other materials provided with the -#distribution. -#* Neither the name of Google Inc.nor the names of its -#contributors may be used to endorse or promote products derived from -#this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. # -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -#A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT -#OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT -#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#performs a single qps run with one client and one server +# performs a single qps run with one client and one server -set - - ex +set -ex - cd - $(dirname $0) / - ../../ - .. +cd $(dirname $0)/../../.. - killall qps_worker - || true +killall qps_worker || true - config = opt +config=opt - NUMCPUS =`python2 .7 - c - 'import multiprocessing; print multiprocessing.cpu_count()'` +NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'` - make CONFIG = $config qps_worker qps_driver - - j$NUMCPUS +make CONFIG=$config qps_worker qps_driver -j$NUMCPUS - bins - / $config / qps_worker - - driver_port - 10000 &PID1 = $ !bins / $config / qps_worker - - driver_port 10010 &PID2 = $ ! +bins/$config/qps_worker -driver_port 10000 & +PID1=$! +bins/$config/qps_worker -driver_port 10010 & +PID2=$! - export QPS_WORKERS = "localhost:10000,localhost:10010" +export QPS_WORKERS="localhost:10000,localhost:10010" - bins - / $config / qps_driver $ * +bins/$config/qps_driver $* + +kill -2 $PID1 $PID2 +wait - kill - - 2 $PID1 $PID2 wait From 454074369e361450114d9303d6354664ac7d7fc0 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 08:33:49 -0800 Subject: [PATCH 14/18] Better reasonable default --- test/cpp/qps/qps_driver.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index ebbf931933e..d8bee6ec2b7 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -108,10 +108,8 @@ static void QpsDriver() { params->set_req_size(FLAGS_simple_req_size); } } else { - // choose a reasonable default - auto params = - client_config.mutable_payload_config()->mutable_simple_params(); - params->set_resp_size(1); + // set a reasonable default: proto but no payload + client_config.mutable_payload_config()->mutable_simple_params(); } client_config.set_async_client_threads(FLAGS_async_client_threads); From f8603adba192d1d89aec5f5860033041ec383984 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 12:49:33 -0800 Subject: [PATCH 15/18] Secure performance testing for C++ is in the hizzouse! --- Makefile | 45 +++++++++- build.yaml | 17 ++++ test/cpp/qps/qps_driver.cc | 12 +++ .../qps/secure_sync_unary_ping_pong_test.cc | 90 +++++++++++++++++++ tools/run_tests/sources_and_headers.json | 17 ++++ tools/run_tests/tests.json | 16 ++++ 6 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 test/cpp/qps/secure_sync_unary_ping_pong_test.cc diff --git a/Makefile b/Makefile index 9e2b5e0b10f..ca0856d103e 100644 --- a/Makefile +++ b/Makefile @@ -889,6 +889,7 @@ qps_worker: $(BINDIR)/$(CONFIG)/qps_worker reconnect_interop_client: $(BINDIR)/$(CONFIG)/reconnect_interop_client reconnect_interop_server: $(BINDIR)/$(CONFIG)/reconnect_interop_server secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test +secure_sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test server_crash_test: $(BINDIR)/$(CONFIG)/server_crash_test server_crash_test_client: $(BINDIR)/$(CONFIG)/server_crash_test_client shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test @@ -1802,7 +1803,7 @@ buildtests: buildtests_c buildtests_cxx buildtests_zookeeper buildtests_c: privatelibs_c $(BINDIR)/$(CONFIG)/alpn_test $(BINDIR)/$(CONFIG)/bin_encoder_test $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test $(BINDIR)/$(CONFIG)/chttp2_stream_encoder_test $(BINDIR)/$(CONFIG)/chttp2_stream_map_test $(BINDIR)/$(CONFIG)/compression_test $(BINDIR)/$(CONFIG)/dualstack_socket_test $(BINDIR)/$(CONFIG)/endpoint_pair_test $(BINDIR)/$(CONFIG)/fd_conservation_posix_test $(BINDIR)/$(CONFIG)/fd_posix_test $(BINDIR)/$(CONFIG)/fling_client $(BINDIR)/$(CONFIG)/fling_server $(BINDIR)/$(CONFIG)/fling_stream_test $(BINDIR)/$(CONFIG)/fling_test $(BINDIR)/$(CONFIG)/gpr_cmdline_test $(BINDIR)/$(CONFIG)/gpr_cpu_test $(BINDIR)/$(CONFIG)/gpr_env_test $(BINDIR)/$(CONFIG)/gpr_file_test $(BINDIR)/$(CONFIG)/gpr_histogram_test $(BINDIR)/$(CONFIG)/gpr_host_port_test $(BINDIR)/$(CONFIG)/gpr_log_test $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test $(BINDIR)/$(CONFIG)/gpr_slice_test $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test $(BINDIR)/$(CONFIG)/gpr_string_test $(BINDIR)/$(CONFIG)/gpr_sync_test $(BINDIR)/$(CONFIG)/gpr_thd_test $(BINDIR)/$(CONFIG)/gpr_time_test $(BINDIR)/$(CONFIG)/gpr_tls_test $(BINDIR)/$(CONFIG)/gpr_useful_test $(BINDIR)/$(CONFIG)/grpc_auth_context_test $(BINDIR)/$(CONFIG)/grpc_base64_test $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test $(BINDIR)/$(CONFIG)/grpc_channel_args_test $(BINDIR)/$(CONFIG)/grpc_channel_stack_test $(BINDIR)/$(CONFIG)/grpc_completion_queue_test $(BINDIR)/$(CONFIG)/grpc_credentials_test $(BINDIR)/$(CONFIG)/grpc_json_token_test $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test $(BINDIR)/$(CONFIG)/grpc_security_connector_test $(BINDIR)/$(CONFIG)/grpc_stream_op_test $(BINDIR)/$(CONFIG)/hpack_parser_test $(BINDIR)/$(CONFIG)/hpack_table_test $(BINDIR)/$(CONFIG)/httpcli_format_request_test $(BINDIR)/$(CONFIG)/httpcli_parser_test $(BINDIR)/$(CONFIG)/httpcli_test $(BINDIR)/$(CONFIG)/json_rewrite $(BINDIR)/$(CONFIG)/json_rewrite_test $(BINDIR)/$(CONFIG)/json_test $(BINDIR)/$(CONFIG)/lame_client_test $(BINDIR)/$(CONFIG)/lb_policies_test $(BINDIR)/$(CONFIG)/message_compress_test $(BINDIR)/$(CONFIG)/multi_init_test $(BINDIR)/$(CONFIG)/multiple_server_queues_test $(BINDIR)/$(CONFIG)/murmur_hash_test $(BINDIR)/$(CONFIG)/no_server_test $(BINDIR)/$(CONFIG)/resolve_address_test $(BINDIR)/$(CONFIG)/secure_endpoint_test $(BINDIR)/$(CONFIG)/sockaddr_utils_test $(BINDIR)/$(CONFIG)/tcp_client_posix_test $(BINDIR)/$(CONFIG)/tcp_posix_test $(BINDIR)/$(CONFIG)/tcp_server_posix_test $(BINDIR)/$(CONFIG)/time_averaged_stats_test $(BINDIR)/$(CONFIG)/timeout_encoding_test $(BINDIR)/$(CONFIG)/timer_heap_test $(BINDIR)/$(CONFIG)/timer_list_test $(BINDIR)/$(CONFIG)/timers_test $(BINDIR)/$(CONFIG)/transport_metadata_test $(BINDIR)/$(CONFIG)/transport_security_test $(BINDIR)/$(CONFIG)/udp_server_test $(BINDIR)/$(CONFIG)/uri_parser_test $(BINDIR)/$(CONFIG)/workqueue_test $(BINDIR)/$(CONFIG)/h2_compress_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_compress_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_call_creds_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_compress_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_compress_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_compress_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_compress_default_host_test $(BINDIR)/$(CONFIG)/h2_compress_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_compress_empty_batch_test $(BINDIR)/$(CONFIG)/h2_compress_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_compress_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_compress_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_compress_large_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_compress_max_message_length_test $(BINDIR)/$(CONFIG)/h2_compress_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_no_op_test $(BINDIR)/$(CONFIG)/h2_compress_payload_test $(BINDIR)/$(CONFIG)/h2_compress_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_compress_registered_call_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_compress_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_compress_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_compress_simple_request_test $(BINDIR)/$(CONFIG)/h2_compress_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_fakesec_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_call_creds_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_fakesec_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_fakesec_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_default_host_test $(BINDIR)/$(CONFIG)/h2_fakesec_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_fakesec_empty_batch_test $(BINDIR)/$(CONFIG)/h2_fakesec_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_fakesec_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_fakesec_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_large_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_fakesec_max_message_length_test $(BINDIR)/$(CONFIG)/h2_fakesec_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_no_op_test $(BINDIR)/$(CONFIG)/h2_fakesec_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_fakesec_registered_call_test $(BINDIR)/$(CONFIG)/h2_fakesec_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_fakesec_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_fakesec_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_fakesec_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_simple_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_full_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_full_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_full_call_creds_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_full_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_full_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_full_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_full_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_full_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_full_default_host_test $(BINDIR)/$(CONFIG)/h2_full_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_full_empty_batch_test $(BINDIR)/$(CONFIG)/h2_full_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_full_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_full_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_full_large_metadata_test $(BINDIR)/$(CONFIG)/h2_full_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_full_max_message_length_test $(BINDIR)/$(CONFIG)/h2_full_metadata_test $(BINDIR)/$(CONFIG)/h2_full_no_op_test $(BINDIR)/$(CONFIG)/h2_full_payload_test $(BINDIR)/$(CONFIG)/h2_full_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_full_registered_call_test $(BINDIR)/$(CONFIG)/h2_full_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_full_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_full_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_full_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_full_simple_request_test $(BINDIR)/$(CONFIG)/h2_full_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_full+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_full+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_full+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_default_host_test $(BINDIR)/$(CONFIG)/h2_full+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_full+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_full+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_full+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_full+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_full+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_full+poll_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_full+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_oauth2_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_call_creds_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_oauth2_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_oauth2_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_default_host_test $(BINDIR)/$(CONFIG)/h2_oauth2_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_oauth2_empty_batch_test $(BINDIR)/$(CONFIG)/h2_oauth2_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_oauth2_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_oauth2_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_large_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_oauth2_max_message_length_test $(BINDIR)/$(CONFIG)/h2_oauth2_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_no_op_test $(BINDIR)/$(CONFIG)/h2_oauth2_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_oauth2_registered_call_test $(BINDIR)/$(CONFIG)/h2_oauth2_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_oauth2_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_oauth2_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_oauth2_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_simple_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_proxy_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_call_creds_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_proxy_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_proxy_default_host_test $(BINDIR)/$(CONFIG)/h2_proxy_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_proxy_empty_batch_test $(BINDIR)/$(CONFIG)/h2_proxy_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_proxy_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_proxy_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_proxy_large_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_max_message_length_test $(BINDIR)/$(CONFIG)/h2_proxy_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_no_op_test $(BINDIR)/$(CONFIG)/h2_proxy_payload_test $(BINDIR)/$(CONFIG)/h2_proxy_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_proxy_registered_call_test $(BINDIR)/$(CONFIG)/h2_proxy_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_proxy_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_request_test $(BINDIR)/$(CONFIG)/h2_proxy_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_ssl_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_ssl_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_ssl_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uchannel_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_call_creds_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uchannel_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uchannel_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_default_host_test $(BINDIR)/$(CONFIG)/h2_uchannel_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uchannel_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uchannel_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uchannel_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uchannel_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uchannel_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_no_op_test $(BINDIR)/$(CONFIG)/h2_uchannel_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uchannel_registered_call_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uds_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_call_creds_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uds_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uds_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uds_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uds_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uds_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uds_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uds_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uds_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uds_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uds_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_no_op_test $(BINDIR)/$(CONFIG)/h2_uds_payload_test $(BINDIR)/$(CONFIG)/h2_uds_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uds_registered_call_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uds_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uds_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uds_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uds+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uds+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uds+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uds+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uds+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uds+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uds+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uds+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_uds+poll_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uds+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_full_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_full_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_full_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_full_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_full_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_full_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_full_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_full_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_full_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_full_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_full_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_full_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_full_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_full_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_full_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test -buildtests_cxx: buildtests_zookeeper privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/auth_property_iterator_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/client_crash_test $(BINDIR)/$(CONFIG)/client_crash_test_server $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test $(BINDIR)/$(CONFIG)/cxx_slice_test $(BINDIR)/$(CONFIG)/cxx_string_ref_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/qps_interarrival_test $(BINDIR)/$(CONFIG)/qps_openloop_test $(BINDIR)/$(CONFIG)/qps_test $(BINDIR)/$(CONFIG)/reconnect_interop_client $(BINDIR)/$(CONFIG)/reconnect_interop_server $(BINDIR)/$(CONFIG)/secure_auth_context_test $(BINDIR)/$(CONFIG)/server_crash_test $(BINDIR)/$(CONFIG)/server_crash_test_client $(BINDIR)/$(CONFIG)/shutdown_test $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/streaming_throughput_test $(BINDIR)/$(CONFIG)/stress_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_stress_test +buildtests_cxx: buildtests_zookeeper privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/auth_property_iterator_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/client_crash_test $(BINDIR)/$(CONFIG)/client_crash_test_server $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test $(BINDIR)/$(CONFIG)/cxx_slice_test $(BINDIR)/$(CONFIG)/cxx_string_ref_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/qps_interarrival_test $(BINDIR)/$(CONFIG)/qps_openloop_test $(BINDIR)/$(CONFIG)/qps_test $(BINDIR)/$(CONFIG)/reconnect_interop_client $(BINDIR)/$(CONFIG)/reconnect_interop_server $(BINDIR)/$(CONFIG)/secure_auth_context_test $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/server_crash_test $(BINDIR)/$(CONFIG)/server_crash_test_client $(BINDIR)/$(CONFIG)/shutdown_test $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/streaming_throughput_test $(BINDIR)/$(CONFIG)/stress_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_stress_test ifeq ($(HAS_ZOOKEEPER),true) buildtests_zookeeper: privatelibs_zookeeper $(BINDIR)/$(CONFIG)/zookeeper_test @@ -3550,6 +3551,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/qps_test || ( echo test qps_test failed ; exit 1 ) $(E) "[RUN] Testing secure_auth_context_test" $(Q) $(BINDIR)/$(CONFIG)/secure_auth_context_test || ( echo test secure_auth_context_test failed ; exit 1 ) + $(E) "[RUN] Testing secure_sync_unary_ping_pong_test" + $(Q) $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test || ( echo test secure_sync_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing server_crash_test" $(Q) $(BINDIR)/$(CONFIG)/server_crash_test || ( echo test server_crash_test failed ; exit 1 ) $(E) "[RUN] Testing shutdown_test" @@ -10372,6 +10375,46 @@ endif endif +SECURE_SYNC_UNARY_PING_PONG_TEST_SRC = \ + test/cpp/qps/secure_sync_unary_ping_pong_test.cc \ + +SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SECURE_SYNC_UNARY_PING_PONG_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: openssl_dep_error + +else + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: $(PROTOBUF_DEP) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/qps/secure_sync_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +deps_secure_sync_unary_ping_pong_test: $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS:.o=.dep) +endif +endif + + SERVER_CRASH_TEST_SRC = \ test/cpp/end2end/server_crash_test.cc \ diff --git a/build.yaml b/build.yaml index fba87cc07a4..873606f9806 100644 --- a/build.yaml +++ b/build.yaml @@ -2042,6 +2042,23 @@ targets: - grpc - gpr_test_util - gpr +- name: secure_sync_unary_ping_pong_test + build: test + language: c++ + src: + - test/cpp/qps/secure_sync_unary_ping_pong_test.cc + deps: + - qps + - grpc++_test_util + - grpc_test_util + - grpc++ + - grpc + - gpr_test_util + - gpr + platforms: + - mac + - linux + - posix - name: server_crash_test build: test language: c++ diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index d8bee6ec2b7..cdcd808bf77 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -74,12 +74,15 @@ DEFINE_double(determ_load, -1.0, "Deterministic offered load (qps)"); DEFINE_double(pareto_base, -1.0, "Pareto base interarrival time (us)"); DEFINE_double(pareto_alpha, -1.0, "Pareto alpha value"); +DEFINE_bool(secure_test, false, "Run a secure test"); + using grpc::testing::ClientConfig; using grpc::testing::ServerConfig; using grpc::testing::ClientType; using grpc::testing::ServerType; using grpc::testing::RpcType; using grpc::testing::ResourceUsage; +using grpc::testing::SecurityParams; namespace grpc { namespace testing { @@ -139,6 +142,15 @@ static void QpsDriver() { server_config.set_server_type(server_type); server_config.set_async_server_threads(FLAGS_async_server_threads); + if (FLAGS_secure_test) { + // Set up security params + SecurityParams security; + security.set_use_test_ca(true); + security.set_server_host_override("foo.test.google.fr"); + client_config.mutable_security_params()->CopyFrom(security); + server_config.mutable_security_params()->CopyFrom(security); + } + const auto result = RunScenario( client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, FLAGS_warmup_seconds, FLAGS_benchmark_seconds, FLAGS_local_workers); diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc new file mode 100644 index 00000000000..874b7470d47 --- /dev/null +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -0,0 +1,90 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include + +#include + +#include "test/cpp/qps/driver.h" +#include "test/cpp/qps/report.h" +#include "test/cpp/util/benchmark_config.h" + +namespace grpc { +namespace testing { + +static const int WARMUP = 5; +static const int BENCHMARK = 10; + +static void RunSynchronousUnaryPingPong() { + gpr_log(GPR_INFO, "Running Synchronous Unary Ping Pong"); + + ClientConfig client_config; + client_config.set_client_type(SYNC_CLIENT); + client_config.set_outstanding_rpcs_per_channel(1); + client_config.set_client_channels(1); + client_config.mutable_payload_config() + ->mutable_simple_params() + ->set_resp_size(1); + client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed_loop(); + + ServerConfig server_config; + server_config.set_server_type(SYNC_SERVER); + + // Set up security params + SecurityParams security; + security.set_use_test_ca(true); + security.set_server_host_override("foo.test.google.fr"); + client_config.mutable_security_params()->CopyFrom(security); + server_config.mutable_security_params()->CopyFrom(security); + + const auto result = + RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); + + GetReporter()->ReportQPS(*result); + GetReporter()->ReportLatency(*result); +} + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc::testing::InitBenchmark(&argc, &argv, true); + + signal(SIGPIPE, SIG_IGN); + grpc::testing::RunSynchronousUnaryPingPong(); + + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index eb9a117733a..7f4b339a53d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1587,6 +1587,23 @@ "test/cpp/common/secure_auth_context_test.cc" ] }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util", + "qps" + ], + "headers": [], + "language": "c++", + "name": "secure_sync_unary_ping_pong_test", + "src": [ + "test/cpp/qps/secure_sync_unary_ping_pong_test.cc" + ] + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index a8366e05abe..3abd41dfdc2 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1533,6 +1533,22 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "secure_sync_unary_ping_pong_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "ci_platforms": [ "linux", From 3affdddf5b6b53cda27683eb776915b7f7ea155b Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 13:13:25 -0800 Subject: [PATCH 16/18] Add secure testing to sweep --- test/cpp/qps/qps-sweep.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/cpp/qps/qps-sweep.sh b/test/cpp/qps/qps-sweep.sh index 216e40820c4..36ea974812a 100755 --- a/test/cpp/qps/qps-sweep.sh +++ b/test/cpp/qps/qps-sweep.sh @@ -37,17 +37,21 @@ fi bins=`find . .. ../.. ../../.. -name bins | head -1` -for channels in 1 2 4 8 +for secure in true false do - for client in SYNC_CLIENT ASYNC_CLIENT + for channels in 1 2 4 8 do - for server in SYNC_SERVER ASYNC_SERVER + for client in SYNC_CLIENT ASYNC_CLIENT do - for rpc in UNARY STREAMING + for server in SYNC_SERVER ASYNC_SERVER do - echo "Test $rpc $client $server , $channels channels" - "$bins"/opt/qps_driver --rpc_type=$rpc \ - --client_type=$client --server_type=$server + for rpc in UNARY STREAMING + do + echo "Test $rpc $client $server, $channels channels, secure=$secure" + "$bins"/opt/qps_driver --rpc_type=$rpc \ + --client_type=$client --server_type=$server \ + --secure_test=$secure + done done done done From fba20c987d4eedaa039a828ec7c6ab3fed99ea7d Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 4 Nov 2015 14:49:17 -0800 Subject: [PATCH 17/18] Address some review comments about signal and restoring qps_test_with_poll Make payloads respect the new defaults --- .../cpp/qps/async_streaming_ping_pong_test.cc | 6 -- test/cpp/qps/async_unary_ping_pong_test.cc | 6 -- test/cpp/qps/client.h | 26 ++++-- test/cpp/qps/qps_driver.cc | 2 - test/cpp/qps/qps_openloop_test.cc | 6 -- test/cpp/qps/qps_test.cc | 6 -- test/cpp/qps/qps_test_with_poll.cc | 85 +++++++++++++++++++ test/cpp/qps/qps_worker.cc | 4 +- .../qps/secure_sync_unary_ping_pong_test.cc | 6 -- test/cpp/qps/server.h | 4 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- test/cpp/qps/sync_streaming_ping_pong_test.cc | 6 -- test/cpp/qps/sync_unary_ping_pong_test.cc | 6 -- 14 files changed, 109 insertions(+), 58 deletions(-) create mode 100644 test/cpp/qps/qps_test_with_poll.cc diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index 9aa7f88fa4d..9fef93a70fd 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -35,8 +35,6 @@ #include -#include - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" @@ -54,9 +52,6 @@ static void RunAsyncStreamingPingPong() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); @@ -78,7 +73,6 @@ static void RunAsyncStreamingPingPong() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunAsyncStreamingPingPong(); return 0; } diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index fe2cde038a1..b4ab0e5d595 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -35,8 +35,6 @@ #include -#include - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" @@ -54,9 +52,6 @@ static void RunAsyncUnaryPingPong() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_async_client_threads(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); @@ -76,7 +71,6 @@ static void RunAsyncUnaryPingPong() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunAsyncUnaryPingPong(); return 0; diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 027e0d4be0f..f4400692fea 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -90,7 +90,11 @@ class Client { } else if (config.payload_config().has_complex_params()) { GPR_ASSERT(false); // not yet implemented } else { - GPR_ASSERT(false); // badly configured + // default should be simple proto without payloads + request_.set_response_type(grpc::testing::PayloadType::COMPRESSABLE); + request_.set_response_size(0); + request_.mutable_payload()->set_type( + grpc::testing::PayloadType::COMPRESSABLE); } } virtual ~Client() {} @@ -176,23 +180,29 @@ class Client { const auto& load = config.load_params(); std::unique_ptr random_dist; - if (load.has_poisson()) { + switch (load.load_case()) { + case LoadParams::kClosedLoop: + // Closed-loop doesn't use random dist at all + break; + case LoadParams::kPoisson: random_dist.reset( new ExpDist(load.poisson().offered_load() / num_threads)); - } else if (load.has_uniform()) { + break; + case LoadParams::kUniform: random_dist.reset( new UniformDist(load.uniform().interarrival_lo() * num_threads, load.uniform().interarrival_hi() * num_threads)); - } else if (load.has_determ()) { + break; + case LoadParams::kDeterm: random_dist.reset( new DetDist(num_threads / load.determ().offered_load())); - } else if (load.has_pareto()) { + break; + case LoadParams::kPareto: random_dist.reset( new ParetoDist(load.pareto().interarrival_base() * num_threads, load.pareto().alpha())); - } else if (load.has_closed_loop()) { - // Closed-loop doesn't use random dist at all - } else { // invalid load type + break; + default: GPR_ASSERT(false); } diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index cdcd808bf77..4c93a042cf5 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -167,7 +166,6 @@ static void QpsDriver() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::QpsDriver(); return 0; diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index fbd9558b5a2..dc88c893bb9 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -31,8 +31,6 @@ * */ -#include - #include #include @@ -54,9 +52,6 @@ static void RunQPS() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_poisson()->set_offered_load( @@ -79,7 +74,6 @@ static void RunQPS() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunQPS(); return 0; diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index de81d99a37c..89b35cfb052 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -31,8 +31,6 @@ * */ -#include - #include #include @@ -54,9 +52,6 @@ static void RunQPS() { client_config.set_client_type(ASYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1000); client_config.set_client_channels(8); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_async_client_threads(8); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); @@ -78,7 +73,6 @@ static void RunQPS() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunQPS(); return 0; diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc new file mode 100644 index 00000000000..97da4096ed3 --- /dev/null +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -0,0 +1,85 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include + +#include "test/cpp/qps/driver.h" +#include "test/cpp/qps/report.h" +#include "test/cpp/util/benchmark_config.h" + +extern "C" { +#include "src/core/iomgr/pollset_posix.h" +} + +namespace grpc { +namespace testing { + +static const int WARMUP = 5; +static const int BENCHMARK = 5; + +static void RunQPS() { + gpr_log(GPR_INFO, "Running QPS test"); + + ClientConfig client_config; + client_config.set_client_type(ASYNC_CLIENT); + client_config.set_outstanding_rpcs_per_channel(1000); + client_config.set_client_channels(8); + client_config.set_async_client_threads(8); + client_config.set_rpc_type(UNARY); + client_config.mutable_load_params()->mutable_closed_loop(); + + ServerConfig server_config; + server_config.set_server_type(ASYNC_SERVER); + server_config.set_async_server_threads(4); + + const auto result = + RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); + + GetReporter()->ReportQPSPerCore(*result); + GetReporter()->ReportLatency(*result); +} + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc::testing::InitBenchmark(&argc, &argv, true); + + grpc_platform_become_multipoller = grpc_poll_become_multipoller; + + grpc::testing::RunQPS(); + + return 0; +} diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 8af6fd0f16f..dc59eab7ef6 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -199,8 +199,8 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { return Status(StatusCode::INVALID_ARGUMENT, ""); } ServerStatus status; - status.set_port(server->Port()); - status.set_cores(server->Cores()); + status.set_port(server->port()); + status.set_cores(server->cores()); if (!stream->Write(status)) { return Status(StatusCode::UNKNOWN, ""); } diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc index 874b7470d47..df06f7e471f 100644 --- a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -31,8 +31,6 @@ * */ -#include - #include #include @@ -54,9 +52,6 @@ static void RunSynchronousUnaryPingPong() { client_config.set_client_type(SYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); @@ -83,7 +78,6 @@ static void RunSynchronousUnaryPingPong() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunSynchronousUnaryPingPong(); return 0; diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 0309cb5c20f..6e81edc8ffe 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -86,8 +86,8 @@ class Server { return true; } - int Port() const { return port_; } - int Cores() const { return gpr_cpu_num_cores(); } + int port() const { return port_; } + int cores() const { return gpr_cpu_num_cores(); } static std::shared_ptr CreateServerCredentials( const ServerConfig& config) { if (config.has_security_params()) { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 40f9dd3f46b..2d922fa6150 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -60,7 +60,7 @@ class AsyncQpsServerTest : public Server { explicit AsyncQpsServerTest(const ServerConfig &config) : Server(config) { char *server_address = NULL; - gpr_join_host_port(&server_address, "::", Port()); + gpr_join_host_port(&server_address, "::", port()); ServerBuilder builder; builder.AddListeningPort(server_address, diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 9f06b44aece..a09b174b7e0 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -89,7 +89,7 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server { char* server_address = NULL; - gpr_join_host_port(&server_address, "::", Port()); + gpr_join_host_port(&server_address, "::", port()); builder.AddListeningPort(server_address, Server::CreateServerCredentials(config)); gpr_free(server_address); diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index 250e8eb7727..186afc03f7c 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -31,8 +31,6 @@ * */ -#include - #include #include @@ -54,9 +52,6 @@ static void RunSynchronousStreamingPingPong() { client_config.set_client_type(SYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_rpc_type(STREAMING); client_config.mutable_load_params()->mutable_closed_loop(); @@ -75,7 +70,6 @@ static void RunSynchronousStreamingPingPong() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunSynchronousStreamingPingPong(); return 0; diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 4defcf30657..25851833a6d 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -31,8 +31,6 @@ * */ -#include - #include #include @@ -54,9 +52,6 @@ static void RunSynchronousUnaryPingPong() { client_config.set_client_type(SYNC_CLIENT); client_config.set_outstanding_rpcs_per_channel(1); client_config.set_client_channels(1); - client_config.mutable_payload_config() - ->mutable_simple_params() - ->set_resp_size(1); client_config.set_rpc_type(UNARY); client_config.mutable_load_params()->mutable_closed_loop(); @@ -76,7 +71,6 @@ static void RunSynchronousUnaryPingPong() { int main(int argc, char** argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - signal(SIGPIPE, SIG_IGN); grpc::testing::RunSynchronousUnaryPingPong(); return 0; From c76ff107b6003086f9280241dc7f77491a4b0740 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 4 Nov 2015 19:22:44 -0800 Subject: [PATCH 18/18] Removed consts to make MSVC happy --- test/core/surface/byte_buffer_reader_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index c654f80f71c..7f9cd6b62b0 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -185,8 +185,8 @@ static void test_byte_buffer_from_reader(void) { } static void test_readall(void) { - const char* lotsa_as[512]; - const char* lotsa_bs[1024]; + char* lotsa_as[512]; + char* lotsa_bs[1024]; gpr_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader;