Return shared_ptr by value plus minor dependency fix

pull/1649/head
David Garcia Quintas 10 years ago
parent a6b559a76a
commit 30ecd2b8d9
  1. 3
      Makefile
  2. 1
      build.json
  3. 2
      test/cpp/util/benchmark_config.cc
  4. 2
      test/cpp/util/benchmark_config.h

@ -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)
-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 @@
"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"
] ]

@ -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);
* 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

Loading…
Cancel
Save