You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/07/20 21:18:23 UTC

mesos git commit: Removed the optional time window from metrics::Counter.

Repository: mesos
Updated Branches:
  refs/heads/master cce7f5f6e -> 0242d84c1


Removed the optional time window from metrics::Counter.

Although it makes sense for a monitoring system show Counters as a time
series, adding a time window to a metrics::Counter generates percentile
statistics, which don't make any sense for counters. Remove the time
window argument so that Counters don't ever get a TimeSeries.

Review: https://reviews.apache.org/r/60959/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0242d84c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0242d84c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0242d84c

Branch: refs/heads/master
Commit: 0242d84c15a5d4129625f5b39f94a0c60138f2a8
Parents: cce7f5f
Author: James Peach <jp...@apache.org>
Authored: Thu Jul 20 14:18:03 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Thu Jul 20 14:18:03 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/metrics/counter.hpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0242d84c/3rdparty/libprocess/include/process/metrics/counter.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/metrics/counter.hpp b/3rdparty/libprocess/include/process/metrics/counter.hpp
index 15aeeb5..3531b53 100644
--- a/3rdparty/libprocess/include/process/metrics/counter.hpp
+++ b/3rdparty/libprocess/include/process/metrics/counter.hpp
@@ -28,10 +28,8 @@ class Counter : public Metric
 public:
   // 'name' is the unique name for the instance of Counter being constructed.
   // This is what will be used as the key in the JSON endpoint.
-  // 'window' is the amount of history to keep for this Metric.
-  Counter(const std::string& name, const Option<Duration>& window = None())
-    : Metric(name, window),
-      data(new Data())
+  Counter(const std::string& name)
+    : Metric(name, None()), data(new Data())
   {
     push(static_cast<double>(data->value.load()));
   }