kerneltime commented on code in PR #6776:
URL: https://github.com/apache/ozone/pull/6776#discussion_r1630856438


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java:
##########
@@ -97,10 +131,26 @@ public void 
decrPendingContainerOpsMetrics(ContainerProtos.Type type) {
   }
 
   public void addContainerOpsLatency(ContainerProtos.Type type,
-      long latencyMillis) {
+      long latencyMillis, String datanode) {
+    recordLatencyMetricsIfNeeded(type, latencyMillis, datanode);
     containerOpsLatency.get(type).add(latencyMillis);
   }
 
+  private void recordLatencyMetricsIfNeeded(ContainerProtos.Type type, long 
latencyMillis,
+      String datanode) {
+    if (latencyMsThresholdsOrder.length > 0 && 
topLatencyMetricsSet.contains(type)) {

Review Comment:
   This seems like a lot of computation added in the critical data path.



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