diff options
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/client.h | 12 | ||||
-rw-r--r-- | test/cpp/qps/client_async.cc | 6 | ||||
-rw-r--r-- | test/cpp/qps/client_sync.cc | 9 | ||||
-rw-r--r-- | test/cpp/qps/driver.cc | 22 | ||||
-rw-r--r-- | test/cpp/qps/interarrival.h | 2 | ||||
-rw-r--r-- | test/cpp/qps/perf_db_client.h | 7 | ||||
-rw-r--r-- | test/cpp/qps/qps_interarrival_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_openloop_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_test_with_poll.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_worker.cc | 5 | ||||
-rw-r--r-- | test/cpp/qps/report.h | 3 | ||||
-rw-r--r-- | test/cpp/qps/server_async.cc | 10 | ||||
-rw-r--r-- | test/cpp/qps/server_sync.cc | 23 | ||||
-rw-r--r-- | test/cpp/qps/stats.h | 3 | ||||
-rw-r--r-- | test/cpp/qps/sync_streaming_ping_pong_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/sync_unary_ping_pong_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/timer.cc | 1 | ||||
-rw-r--r-- | test/cpp/qps/worker.cc | 2 |
19 files changed, 55 insertions, 74 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 1c4f46328f..0f95cfea38 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -34,14 +34,14 @@ #ifndef TEST_QPS_CLIENT_H #define TEST_QPS_CLIENT_H +#include <condition_variable> +#include <mutex> + #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/qpstest.grpc.pb.h" - -#include <condition_variable> -#include <mutex> -#include <grpc++/config.h> +#include "test/cpp/util/create_test_channel.h" namespace grpc { @@ -125,11 +125,11 @@ class Client { channel_ = CreateTestChannel(target, config.enable_ssl()); stub_ = TestService::NewStub(channel_); } - ChannelInterface* get_channel() { return channel_.get(); } + Channel* get_channel() { return channel_.get(); } TestService::Stub* get_stub() { return stub_.get(); } private: - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; std::unique_ptr<TestService::Stub> stub_; }; std::vector<ClientChannelInfo> channels_; diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index a337610cbf..f779e4a577 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -46,14 +46,12 @@ #include <grpc/support/histogram.h> #include <grpc/support/log.h> #include <gflags/gflags.h> -#include <grpc++/async_unary_call.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include "test/cpp/util/create_test_channel.h" + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" +#include "test/cpp/util/create_test_channel.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index db5416a707..123dca6600 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -31,6 +31,8 @@ * */ +#include <sys/signal.h> + #include <cassert> #include <chrono> #include <memory> @@ -40,21 +42,18 @@ #include <vector> #include <sstream> -#include <sys/signal.h> - +#include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/histogram.h> #include <grpc/support/host_port.h> #include <grpc/support/log.h> #include <grpc/support/time.h> -#include <gflags/gflags.h> #include <grpc++/client_context.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> #include <gtest/gtest.h> + #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/qpstest.grpc.pb.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 78e3720938..3bd61ea4e8 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -31,24 +31,24 @@ * */ -#include "test/cpp/qps/driver.h" -#include "src/core/support/env.h" +#include <unistd.h> +#include <list> +#include <thread> +#include <deque> +#include <vector> + #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/host_port.h> -#include <grpc++/channel_arguments.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> -#include <grpc++/stream.h> -#include <list> -#include <thread> -#include <deque> -#include <vector> -#include <unistd.h> -#include "test/cpp/qps/histogram.h" -#include "test/cpp/qps/qps_worker.h" + +#include "src/core/support/env.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" +#include "test/cpp/qps/driver.h" +#include "test/cpp/qps/histogram.h" +#include "test/cpp/qps/qps_worker.h" using std::list; using std::thread; diff --git a/test/cpp/qps/interarrival.h b/test/cpp/qps/interarrival.h index 04d14f689f..841619e3ff 100644 --- a/test/cpp/qps/interarrival.h +++ b/test/cpp/qps/interarrival.h @@ -39,7 +39,7 @@ #include <cstdlib> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h index 7a9d86d3a6..ae5d17074b 100644 --- a/test/cpp/qps/perf_db_client.h +++ b/test/cpp/qps/perf_db_client.h @@ -37,12 +37,11 @@ #include <cfloat> #include <grpc/grpc.h> -#include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/support/channel_arguments.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/status.h> #include "test/cpp/qps/perf_db.grpc.pb.h" namespace grpc { @@ -65,7 +64,7 @@ class PerfDbClient { client_user_time_ = DBL_MIN; } - void init(std::shared_ptr<ChannelInterface> channel) { + void init(std::shared_ptr<Channel> channel) { stub_ = PerfDbTransfer::NewStub(channel); } diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index 1eed956a1c..a7979e6187 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -31,13 +31,13 @@ * */ -#include "test/cpp/qps/interarrival.h" #include <chrono> #include <iostream> // Use the C histogram rather than C++ to avoid depending on proto #include <grpc/support/histogram.h> -#include <grpc++/config.h> + +#include "test/cpp/qps/interarrival.h" using grpc::testing::RandomDist; using grpc::testing::InterarrivalTimer; diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 9a7313f6e8..5a6a9249a9 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index ba980a6664..d0c4a79cd9 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc index 90a8da8d11..31d2c1bf7b 100644 --- a/test/cpp/qps/qps_test_with_poll.cc +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f1cea5ee66..51e955a80a 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -47,16 +47,15 @@ #include <grpc/support/log.h> #include <grpc/support/host_port.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_credentials.h> -#include <grpc++/stream.h> + #include "test/core/util/grpc_profiler.h" -#include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/qpstest.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" +#include "test/cpp/util/create_test_channel.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index aec3cbe80a..620abade39 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -37,7 +37,8 @@ #include <memory> #include <set> #include <vector> -#include <grpc++/config.h> + +#include <grpc++/support/config.h> #include "test/cpp/qps/driver.h" #include "test/cpp/qps/qpstest.grpc.pb.h" diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index b4fc49c31c..77415f42ce 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -41,22 +41,20 @@ #include <thread> #include <gflags/gflags.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> -#include <grpc++/async_unary_call.h> -#include <grpc++/config.h> +#include <grpc/support/log.h> +#include <grpc++/support/config.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> #include <gtest/gtest.h> + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" -#include <grpc/grpc.h> -#include <grpc/support/log.h> namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 4c3c9cb497..29ec19cd4b 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -32,28 +32,23 @@ */ #include <sys/signal.h> -#include <thread> - #include <unistd.h> +#include <thread> #include <gflags/gflags.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> -#include <grpc++/config.h> -#include <grpc++/dynamic_thread_pool.h> -#include <grpc++/fixed_size_thread_pool.h> +#include <grpc/support/log.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" -#include <grpc/grpc.h> -#include <grpc/support/log.h> namespace grpc { namespace testing { @@ -93,12 +88,7 @@ class TestServiceImpl GRPC_FINAL : public TestService::Service { class SynchronousServer GRPC_FINAL : public grpc::testing::Server { public: SynchronousServer(const ServerConfig& config, int port) - : thread_pool_(), impl_(MakeImpl(port)) { - if (config.threads() > 0) { - thread_pool_.reset(new FixedSizeThreadPool(config.threads())); - } else { - thread_pool_.reset(new DynamicThreadPool(-config.threads())); - } + : impl_(MakeImpl(port)) { } private: @@ -112,13 +102,10 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server { builder.RegisterService(&service_); - builder.SetThreadPool(thread_pool_.get()); - return builder.BuildAndStart(); } TestServiceImpl service_; - std::unique_ptr<ThreadPoolInterface> thread_pool_; std::unique_ptr<grpc::Server> impl_; }; diff --git a/test/cpp/qps/stats.h b/test/cpp/qps/stats.h index 82dc03e3da..93875017ca 100644 --- a/test/cpp/qps/stats.h +++ b/test/cpp/qps/stats.h @@ -34,9 +34,10 @@ #ifndef TEST_QPS_STATS_UTILS_H #define TEST_QPS_STATS_UTILS_H -#include "test/cpp/qps/histogram.h" #include <string> +#include "test/cpp/qps/histogram.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 d53905a779..52e43939a8 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index d276d13a43..fbd21357aa 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/timer.cc b/test/cpp/qps/timer.cc index c1ba23decd..8edb838da3 100644 --- a/test/cpp/qps/timer.cc +++ b/test/cpp/qps/timer.cc @@ -36,7 +36,6 @@ #include <sys/time.h> #include <sys/resource.h> #include <grpc/support/time.h> -#include <grpc++/config.h> Timer::Timer() : start_(Sample()) {} diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 7cf4903148..935e4853a6 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -36,9 +36,9 @@ #include <chrono> #include <thread> +#include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/time.h> -#include <gflags/gflags.h> #include "test/cpp/qps/qps_worker.h" #include "test/cpp/util/test_config.h" |