ayushtkn commented on a change in pull request #2758:
URL: https://github.com/apache/ozone/pull/2758#discussion_r735491178



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/MeasuredReplicator.java
##########
@@ -67,12 +73,15 @@ public void replicate(ReplicationTask task) {
         (Instant.now().getNano() - task.getQueued().getNano()) / 1_000_000;
     queueTime.incr(msInQueue);
     delegate.replicate(task);
+    long end = System.currentTimeMillis();
     if (task.getStatus() == Status.FAILED) {
       failure.incr();
+      failureBytes.incr(task.getTransferredBytes());
+      failureTime.incr(end - start);

Review comment:
       We are using ``System.currentTimeMillis();`` to calculate the time 
duration, Should we use ``Time.monotonicNow()``?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to