aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2018-06-07 22:52:23 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-06-14 14:58:09 -0400
commit373fc6dc40a7d12bb257d67188ca3aa3c997d8a6 (patch)
treea0bf04f2f5ee080b1adeb6d9dc59a91157ae0d45 /test/cpp/qps
parent58e0cbf9fb67186ee67be5bb71aba36e9cfebe7f (diff)
Manual fixes to enable performance- clang tidy checks
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/client.h2
-rw-r--r--test/cpp/qps/client_async.cc14
-rw-r--r--test/cpp/qps/client_sync.cc2
-rw-r--r--test/cpp/qps/driver.cc1
4 files changed, 9 insertions, 10 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 31ae6ca1fb..9d58ea8882 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -450,7 +450,7 @@ class ClientImpl : public Client {
private:
void set_channel_args(const ClientConfig& config, ChannelArguments* args) {
- for (auto channel_arg : config.channel_args()) {
+ for (const auto& channel_arg : config.channel_args()) {
if (channel_arg.value_case() == ChannelArg::kStrValue) {
args->SetString(channel_arg.name(), channel_arg.str_value());
} else if (channel_arg.value_case() == ChannelArg::kIntValue) {
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index e6dbb7e076..bad24cf04a 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -299,7 +299,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
};
static std::unique_ptr<BenchmarkService::Stub> BenchmarkStubCreator(
- std::shared_ptr<Channel> ch) {
+ const std::shared_ptr<Channel>& ch) {
return BenchmarkService::NewStub(ch);
}
@@ -314,7 +314,7 @@ class AsyncUnaryClient final
~AsyncUnaryClient() override {}
private:
- static void CheckDone(grpc::Status s, SimpleResponse* response,
+ static void CheckDone(const grpc::Status& s, SimpleResponse* response,
HistogramEntry* entry) {
entry->set_status(s.error_code());
}
@@ -498,7 +498,7 @@ class AsyncStreamingPingPongClient final
~AsyncStreamingPingPongClient() override {}
private:
- static void CheckDone(grpc::Status s, SimpleResponse* response) {}
+ static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static std::unique_ptr<
grpc::ClientAsyncReaderWriter<SimpleRequest, SimpleResponse>>
PrepareReq(BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
@@ -630,7 +630,7 @@ class AsyncStreamingFromClientClient final
~AsyncStreamingFromClientClient() override {}
private:
- static void CheckDone(grpc::Status s, SimpleResponse* response) {}
+ static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static std::unique_ptr<grpc::ClientAsyncWriter<SimpleRequest>> PrepareReq(
BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
SimpleResponse* resp, CompletionQueue* cq) {
@@ -745,7 +745,7 @@ class AsyncStreamingFromServerClient final
~AsyncStreamingFromServerClient() override {}
private:
- static void CheckDone(grpc::Status s, SimpleResponse* response) {}
+ static void CheckDone(const grpc::Status& s, SimpleResponse* response) {}
static std::unique_ptr<grpc::ClientAsyncReader<SimpleResponse>> PrepareReq(
BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
const SimpleRequest& req, CompletionQueue* cq) {
@@ -895,7 +895,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
};
static std::unique_ptr<grpc::GenericStub> GenericStubCreator(
- std::shared_ptr<Channel> ch) {
+ const std::shared_ptr<Channel>& ch) {
return std::unique_ptr<grpc::GenericStub>(new grpc::GenericStub(ch));
}
@@ -911,7 +911,7 @@ class GenericAsyncStreamingClient final
~GenericAsyncStreamingClient() override {}
private:
- static void CheckDone(grpc::Status s, ByteBuffer* response) {}
+ static void CheckDone(const grpc::Status& s, ByteBuffer* response) {}
static std::unique_ptr<grpc::GenericClientAsyncReaderWriter> PrepareReq(
grpc::GenericStub* stub, grpc::ClientContext* ctx,
const grpc::string& method_name, CompletionQueue* cq) {
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index 3a60c57e1d..668d9abf5c 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -44,7 +44,7 @@ namespace grpc {
namespace testing {
static std::unique_ptr<BenchmarkService::Stub> BenchmarkStubCreator(
- std::shared_ptr<Channel> ch) {
+ const std::shared_ptr<Channel>& ch) {
return BenchmarkService::NewStub(ch);
}
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index ecf5860b93..cabbd51843 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -217,7 +217,6 @@ std::unique_ptr<ScenarioResult> RunScenario(
// To be added to the result, containing the final configuration used for
// client and config (including host, etc.)
ClientConfig result_client_config;
- const ServerConfig& result_server_config = initial_server_config;
// Get client, server lists; ignore if inproc test
auto workers = (!run_inproc) ? get_workers("QPS_WORKERS") : deque<string>();