kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [3/6] kudu git commit: metrics: move SCOPED_LATENCY_METRIC to metrics.h
Date Mon, 26 Sep 2016 15:59:37 GMT
metrics: move SCOPED_LATENCY_METRIC to metrics.h

Addresses a simple TODO.

Change-Id: I1f1287ade44c60236d2859b5e528ce7e365645ef
Reviewed-on: http://gerrit.cloudera.org:8080/4469
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <dralves@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/8da741f2
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/8da741f2
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/8da741f2

Branch: refs/heads/master
Commit: 8da741f215919dd15be1c63546bee9b3e5afe776
Parents: 4e3d255
Author: Todd Lipcon <todd@apache.org>
Authored: Mon Sep 19 18:23:16 2016 -0700
Committer: David Ribeiro Alves <dralves@apache.org>
Committed: Fri Sep 23 22:30:27 2016 +0000

----------------------------------------------------------------------
 src/kudu/consensus/log_metrics.h | 4 ----
 src/kudu/util/metrics.h          | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/8da741f2/src/kudu/consensus/log_metrics.h
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/log_metrics.h b/src/kudu/consensus/log_metrics.h
index f29e58c..30dfcde 100644
--- a/src/kudu/consensus/log_metrics.h
+++ b/src/kudu/consensus/log_metrics.h
@@ -43,10 +43,6 @@ struct LogMetrics {
   scoped_refptr<Histogram> entry_batches_per_group;
 };
 
-// TODO extract and generalize this for all histogram metrics
-#define SCOPED_LATENCY_METRIC(_mtx, _h) \
-  ScopedLatencyMetric _h##_metric((_mtx) ? (_mtx)->_h.get() : NULL)
-
 } // namespace log
 } // namespace kudu
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/8da741f2/src/kudu/util/metrics.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/metrics.h b/src/kudu/util/metrics.h
index 4952410..b9e739b 100644
--- a/src/kudu/util/metrics.h
+++ b/src/kudu/util/metrics.h
@@ -1013,6 +1013,10 @@ class ScopedLatencyMetric {
   MonoTime time_started_;
 };
 
+#define SCOPED_LATENCY_METRIC(_mtx, _h) \
+  ScopedLatencyMetric _h##_metric((_mtx) ? (_mtx)->_h.get() : NULL)
+
+
 ////////////////////////////////////////////////////////////
 // Inline implementations of template methods
 ////////////////////////////////////////////////////////////


Mime
View raw message