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


##########
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:
   Compared with the time consumed by RRC itself, I think the time consumed 
here is relatively light. It is difficult for our Block RPC to complete 
execution in 1ms. But the time consumed here should be at the us level.
   I think we can do a benchmark, and get a CPU Flame Graphs for a Ozone client 
to check whether it is a heavier operation



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