sarvekshayr commented on code in PR #8896:
URL: https://github.com/apache/ozone/pull/8896#discussion_r2297253450


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCreateRequestWithFSO.java:
##########
@@ -206,13 +212,17 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
               omBucketInfo.copyObject(), volumeId);
 
       result = Result.SUCCESS;
+      long endNanosCreateKeySuccessLatencyNs = Time.monotonicNowNanos();

Review Comment:
   Rename `endNanosCreateKeySuccessLatencyNs` in both places to 
`createKeyEndTime`, capture the time in the finally block and update the 
latency metrics based on result.
   
   ```
   finally {
       long createKeyEndTime = Time.monotonicNowNanos();
       long latency = createKeyEndTime - createKeyStartTime;
       if (result == Result.SUCCESS) {
           perfMetrics.addCreateKeySuccessLatencyNs(latency);
       } else {
           perfMetrics.addCreateKeyFailureLatencyNs(latency);
       }
   ```



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