You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/10/02 17:59:59 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #490: Add latency metric components for WAGED rebalancer

jiajunwang commented on a change in pull request #490: Add latency metric components for WAGED rebalancer
URL: https://github.com/apache/helix/pull/490#discussion_r330688071
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
 ##########
 @@ -391,7 +429,13 @@ private void validateInput(ResourceControllerDataProvider clusterData,
     Map<String, ResourceAssignment> currentBaseline = Collections.emptyMap();
     if (assignmentMetadataStore != null) {
       try {
+        _metricCollector.getMetric(
+            WagedRebalancerMetricCollector.WagedRebalancerMetricNames.StateReadLatencyGauge.name(),
+            LatencyMetric.class).startMeasuringLatency();
         currentBaseline = assignmentMetadataStore.getBaseline();
+        _metricCollector.getMetric(
+            WagedRebalancerMetricCollector.WagedRebalancerMetricNames.StateReadLatencyGauge.name(),
+            LatencyMetric.class).endMeasuringLatency();
 
 Review comment:
   Can we have temp var for the metric object?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org