aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util/metrics_server.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-06-15 12:56:38 -0700
committerGravatar Vijay Pai <vpai@google.com>2016-06-15 12:56:38 -0700
commita63271c77f7ee4802761535f8c844f789328ad9f (patch)
treeb4f7525f453771dc45f5690b8f7431ed92b33187 /test/cpp/util/metrics_server.cc
parent12bf3801b8dd298a2cfd89f45499d5f681e27ed6 (diff)
Deal with to_string, proper usage of nullptr, and lack of map::emplace
Diffstat (limited to 'test/cpp/util/metrics_server.cc')
-rw-r--r--test/cpp/util/metrics_server.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc
index cc6b39b753..1c7cd6382a 100644
--- a/test/cpp/util/metrics_server.cc
+++ b/test/cpp/util/metrics_server.cc
@@ -99,7 +99,7 @@ std::shared_ptr<QpsGauge> MetricsServiceImpl::CreateQpsGauge(
std::lock_guard<std::mutex> lock(mu_);
std::shared_ptr<QpsGauge> qps_gauge(new QpsGauge());
- const auto p = qps_gauges_.emplace(name, qps_gauge);
+ const auto p = qps_gauges_.insert(std::make_pair(name, qps_gauge));
// p.first is an iterator pointing to <name, shared_ptr<QpsGauge>> pair.
// p.second is a boolean which is set to 'true' if the QpsGauge is
@@ -114,7 +114,7 @@ std::shared_ptr<QpsGauge> MetricsServiceImpl::CreateQpsGauge(
std::unique_ptr<grpc::Server> MetricsServiceImpl::StartServer(int port) {
gpr_log(GPR_INFO, "Building metrics server..");
- const grpc::string address = "0.0.0.0:" + std::to_string(port);
+ const grpc::string address = "0.0.0.0:" + grpc::to_string(port);
ServerBuilder builder;
builder.AddListeningPort(address, grpc::InsecureServerCredentials());