Skip to content
Snippets Groups Projects
Commit 30ecd2b8 authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

Return shared_ptr by value plus minor dependency fix

parent a6b559a7
No related branches found
No related tags found
No related merge requests found
...@@ -3199,6 +3199,7 @@ endif ...@@ -3199,6 +3199,7 @@ endif
   
   
LIBGRPC++_BENCHMARK_CONFIG_SRC = \ 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/qps/report.cc \
test/cpp/util/benchmark_config.cc \ test/cpp/util/benchmark_config.cc \
   
...@@ -3244,6 +3245,8 @@ ifneq ($(NO_DEPS),true) ...@@ -3244,6 +3245,8 @@ ifneq ($(NO_DEPS),true)
-include $(LIBGRPC++_BENCHMARK_CONFIG_OBJS:.o=.dep) -include $(LIBGRPC++_BENCHMARK_CONFIG_OBJS:.o=.dep)
endif endif
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 = \ LIBGRPC++_TEST_CONFIG_SRC = \
......
...@@ -530,6 +530,7 @@ ...@@ -530,6 +530,7 @@
"build": "private", "build": "private",
"language": "c++", "language": "c++",
"src": [ "src": [
"test/cpp/qps/qpstest.proto",
"test/cpp/qps/report.cc", "test/cpp/qps/report.cc",
"test/cpp/util/benchmark_config.cc" "test/cpp/util/benchmark_config.cc"
] ]
......
...@@ -63,7 +63,7 @@ class Reporter { ...@@ -63,7 +63,7 @@ class Reporter {
/** Reports QPS per core as (YYY/server core). */ /** Reports QPS per core as (YYY/server core). */
virtual void ReportQPSPerCore(const ScenarioResult& result, 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. */ /** Reports latencies for the 50, 90, 95, 99 and 99.9 percentiles, in ms. */
virtual void ReportLatency(const ScenarioResult& result) const = 0; virtual void ReportLatency(const ScenarioResult& result) const = 0;
......
...@@ -60,7 +60,7 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() { ...@@ -60,7 +60,7 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() {
return std::shared_ptr<Reporter>(composite_reporter); 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()); static std::shared_ptr<Reporter> reporter(InitBenchmarkReporters());
return reporter; return reporter;
} }
......
...@@ -49,7 +49,7 @@ void InitBenchmark(int* argc, char*** argv, bool remove_flags); ...@@ -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 * The returned instane will take care of generating reports for all the actual
* reporters configured via the "enable_*_reporter" command line flags (see * reporters configured via the "enable_*_reporter" command line flags (see
* benchmark_config.cc). */ * benchmark_config.cc). */
const std::shared_ptr<Reporter>& GetReporter(); std::shared_ptr<Reporter> GetReporter();
} // namespace testing } // namespace testing
} // namespace grpc } // namespace grpc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment