aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-05-20 23:06:44 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-05-20 23:08:29 -0700
commit30ecd2b8d901ddfbaa1b607fa514e96e5f49cb11 (patch)
tree3515afd99ae5b09e57a3ddcc0cd5c96733ac4005 /test/cpp
parenta6b559a76ae3d96f8df4abe07173c8b56fbfc032 (diff)
Return shared_ptr by value plus minor dependency fix
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/qps/report.h2
-rw-r--r--test/cpp/util/benchmark_config.cc2
-rw-r--r--test/cpp/util/benchmark_config.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h
index 3712f67a47..630275ecda 100644
--- a/test/cpp/qps/report.h
+++ b/test/cpp/qps/report.h
@@ -63,7 +63,7 @@ class Reporter {
/** Reports QPS per core as (YYY/server core). */
virtual void ReportQPSPerCore(const ScenarioResult& result,
- const ServerConfig& config) const = 0;
+ const ServerConfig& config) const = 0;
/** Reports latencies for the 50, 90, 95, 99 and 99.9 percentiles, in ms. */
virtual void ReportLatency(const ScenarioResult& result) const = 0;
diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc
index 1b15ddcbcc..5b3c1daf5d 100644
--- a/test/cpp/util/benchmark_config.cc
+++ b/test/cpp/util/benchmark_config.cc
@@ -60,7 +60,7 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() {
return std::shared_ptr<Reporter>(composite_reporter);
}
-const std::shared_ptr<Reporter>& GetReporter() {
+std::shared_ptr<Reporter> GetReporter() {
static std::shared_ptr<Reporter> reporter(InitBenchmarkReporters());
return reporter;
}
diff --git a/test/cpp/util/benchmark_config.h b/test/cpp/util/benchmark_config.h
index 3a3a6d61ae..9e98dc3550 100644
--- a/test/cpp/util/benchmark_config.h
+++ b/test/cpp/util/benchmark_config.h
@@ -49,7 +49,7 @@ void InitBenchmark(int* argc, char*** argv, bool remove_flags);
* The returned instane will take care of generating reports for all the actual
* reporters configured via the "enable_*_reporter" command line flags (see
* benchmark_config.cc). */
-const std::shared_ptr<Reporter>& GetReporter();
+std::shared_ptr<Reporter> GetReporter();
} // namespace testing
} // namespace grpc