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/qps/report.h
  4. 2
      test/cpp/util/benchmark_config.cc
  5. 2
      test/cpp/util/benchmark_config.h

@ -3199,6 +3199,7 @@ endif
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 @@ ifneq ($(NO_DEPS),true)
-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 = \

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

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

@ -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;
}

@ -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

Loading…
Cancel
Save