diff options
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/client.cc | 9 | ||||
-rw-r--r-- | test/cpp/qps/server.cc | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/test/cpp/qps/client.cc b/test/cpp/qps/client.cc index 8a33ab2ca3..666f25054a 100644 --- a/test/cpp/qps/client.cc +++ b/test/cpp/qps/client.cc @@ -80,6 +80,13 @@ using grpc::testing::SimpleResponse; using grpc::testing::StatsRequest; using grpc::testing::TestService; +// In some distros, gflags is in the namespace google, and in some others, +// in gflags. This hack is enabling us to find both. +namespace google { } +namespace gflags { } +using namespace google; +using namespace gflags; + static double now() { gpr_timespec tv = gpr_now(); return 1e9 * tv.tv_sec + tv.tv_nsec; @@ -221,7 +228,7 @@ void RunTest(const int client_threads, const int client_channels, int main(int argc, char **argv) { grpc_init(); - google::ParseCommandLineFlags(&argc, &argv, true); + ParseCommandLineFlags(&argc, &argv, true); GPR_ASSERT(FLAGS_server_port); diff --git a/test/cpp/qps/server.cc b/test/cpp/qps/server.cc index dcef8f20ab..8e136349a1 100644 --- a/test/cpp/qps/server.cc +++ b/test/cpp/qps/server.cc @@ -68,6 +68,13 @@ using grpc::testing::StatsRequest; using grpc::testing::TestService; using grpc::Status; +// In some distros, gflags is in the namespace google, and in some others, +// in gflags. This hack is enabling us to find both. +namespace google { } +namespace gflags { } +using namespace google; +using namespace gflags; + static bool got_sigint = false; static void sigint_handler(int x) { got_sigint = 1; } @@ -149,7 +156,7 @@ static void RunServer() { int main(int argc, char** argv) { grpc_init(); - google::ParseCommandLineFlags(&argc, &argv, true); + ParseCommandLineFlags(&argc, &argv, true); signal(SIGINT, sigint_handler); |