i3wangyi commented on a change in pull request #636: Simply and enhance the
RebalanceLatencyGauge so it can be used in multi-threads.
URL: https://github.com/apache/helix/pull/636#discussion_r353444875
##########
File path:
helix-core/src/main/java/org/apache/helix/monitoring/metrics/implementation/RebalanceLatencyGauge.java
##########
@@ -50,24 +54,24 @@ public RebalanceLatencyGauge(String metricName, long
slidingTimeWindow) {
@Override
public void startMeasuringLatency() {
reset();
- _startTime = System.currentTimeMillis();
+ _startTime.set(System.currentTimeMillis());
}
/**
* WARNING: this method is not thread-safe.
Review comment:
nit: update the comment? After your change, the class should be thread-safe
implementation, right?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]