Return shared_ptr by value plus minor dependency fix
diff --git a/Makefile b/Makefile
index f2473f3..fc742bc 100644
--- a/Makefile
+++ b/Makefile
@@ -3199,6 +3199,7 @@
LIBGRPC++_BENCHMARK_CONFIG_SRC = \
+ $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc \
test/cpp/qps/report.cc \
test/cpp/util/benchmark_config.cc \
@@ -3244,6 +3245,8 @@
-include $(LIBGRPC++_BENCHMARK_CONFIG_OBJS:.o=.dep)
endif
endif
+$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc
LIBGRPC++_TEST_CONFIG_SRC = \
diff --git a/build.json b/build.json
index a3595f1..4e6accd 100644
--- a/build.json
+++ b/build.json
@@ -530,6 +530,7 @@
"build": "private",
"language": "c++",
"src": [
+ "test/cpp/qps/qpstest.proto",
"test/cpp/qps/report.cc",
"test/cpp/util/benchmark_config.cc"
]
diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h
index 3712f67..630275e 100644
--- a/test/cpp/qps/report.h
+++ b/test/cpp/qps/report.h
@@ -63,7 +63,7 @@
/** 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 1b15ddc..5b3c1da 100644
--- a/test/cpp/util/benchmark_config.cc
+++ b/test/cpp/util/benchmark_config.cc
@@ -60,7 +60,7 @@
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 3a3a6d6..9e98dc3 100644
--- a/test/cpp/util/benchmark_config.h
+++ b/test/cpp/util/benchmark_config.h
@@ -49,7 +49,7 @@
* 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