Repository: mesos Updated Branches: refs/heads/master cb06bd832 -> 42becf22f
Avoided implicit construction of a hashmap in the metrics. The master and agent metrics code was passing a 'std::map' into a continuation which accepted its parameter as a hashmap, leading to the implicit construction of an extra object. Review: https://reviews.apache.org/r/67870 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/27ed9159 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/27ed9159 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/27ed9159 Branch: refs/heads/master Commit: 27ed91596b3f129891e1df6d7fde1b1140807d2a Parents: cb06bd8 Author: Greg Mann <gregorywm...@gmail.com> Authored: Mon Jul 9 22:59:04 2018 -0700 Committer: Greg Mann <gregorywm...@gmail.com> Committed: Thu Jul 12 13:07:21 2018 -0700 ---------------------------------------------------------------------- src/master/http.cpp | 2 +- src/slave/http.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/27ed9159/src/master/http.cpp ---------------------------------------------------------------------- diff --git a/src/master/http.cpp b/src/master/http.cpp index be95d26..c855de1 100644 --- a/src/master/http.cpp +++ b/src/master/http.cpp @@ -2158,7 +2158,7 @@ Future<Response> Master::Http::getMetrics( } return process::metrics::snapshot(timeout) - .then([contentType](const hashmap<string, double>& metrics) -> Response { + .then([contentType](const map<string, double>& metrics) -> Response { mesos::master::Response response; response.set_type(mesos::master::Response::GET_METRICS); mesos::master::Response::GetMetrics* _getMetrics = http://git-wip-us.apache.org/repos/asf/mesos/blob/27ed9159/src/slave/http.cpp ---------------------------------------------------------------------- diff --git a/src/slave/http.cpp b/src/slave/http.cpp index acbcf7a..51d670d 100644 --- a/src/slave/http.cpp +++ b/src/slave/http.cpp @@ -1046,7 +1046,7 @@ Future<Response> Http::getMetrics( } return process::metrics::snapshot(timeout) - .then([acceptType](const hashmap<string, double>& metrics) -> Response { + .then([acceptType](const map<string, double>& metrics) -> Response { mesos::agent::Response response; response.set_type(mesos::agent::Response::GET_METRICS); mesos::agent::Response::GetMetrics* _getMetrics =