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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org