diff options
author | Guantao Liu <guantaol@google.com> | 2017-07-12 17:36:30 -0700 |
---|---|---|
committer | Guantao Liu <guantaol@google.com> | 2017-07-12 17:36:30 -0700 |
commit | abe3cf51f02d48b28fd67d78e7a3060d763148b5 (patch) | |
tree | c3105d148ef9cfc57b367d175b6df83bfc349a65 /test/cpp/qps/client.h | |
parent | f2e15655bc6eaa4bbe66234946056856ede090da (diff) |
Add a new metric 'Queries/CPU-sec'.
Enable internal credential types.
Diffstat (limited to 'test/cpp/qps/client.h')
-rw-r--r-- | test/cpp/qps/client.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index e759446c1a..f47f378a98 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -39,6 +39,7 @@ #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/usage_timer.h" #include "test/cpp/util/create_test_channel.h" +#include "test/cpp/util/test_credentials_provider.h" namespace grpc { namespace testing { @@ -407,9 +408,18 @@ class ClientImpl : public Client { ChannelArguments args; args.SetInt("shard_to_ensure_no_subchannel_merges", shard); set_channel_args(config, &args); + + grpc::string type; + if (config.has_security_params() && + config.security_params().cred_type().empty()) { + type = kTlsCredentialsType; + } else { + type = config.security_params().cred_type(); + } + channel_ = CreateTestChannel( - target, config.security_params().server_host_override(), - config.has_security_params(), !config.security_params().use_test_ca(), + target, type, config.security_params().server_host_override(), + !config.security_params().use_test_ca(), std::shared_ptr<CallCredentials>(), args); gpr_log(GPR_INFO, "Connecting to %s", target.c_str()); GPR_ASSERT(channel_->WaitForConnected( |