ChenSammi commented on code in PR #5020:
URL: https://github.com/apache/ozone/pull/5020#discussion_r1396651339


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java:
##########
@@ -1806,4 +1806,28 @@ private void createLinkBucket(OzoneVolume sourceVolume, 
String sourceBucket,
         .setSourceBucket(sourceBucket);
     sourceVolume.createBucket(linkBucket, builder.build());
   }
+
+  @Test
+  public void testProcessingDetails() throws IOException, InterruptedException 
{
+    final Logger log = LoggerFactory.getLogger(
+        "org.apache.hadoop.ipc.ProcessingDetails");
+    GenericTestUtils.setLogLevel(log, Level.DEBUG);
+    GenericTestUtils.LogCapturer logCapturer =
+        GenericTestUtils.LogCapturer.captureLogs(log);
+    int keySize = 1024;
+    TestDataUtil.createKey(ozoneBucket, "key1", new String(new byte[keySize],
+        UTF_8));
+    logCapturer.stopCapturing();
+    String logContent = logCapturer.getOutput();
+
+    int nonZeroLines = 0;
+    for (String s: logContent.split("\n")) {
+      if (!s.contains("locksharedTime=0 lockexclusiveTime=0")) {

Review Comment:
   I think we should count and check the line which both lockexclusiveTime and 
locksharedTime are not 0. 
   
   ```
   2023-11-17 11:18:10,642 [IPC Server handler 0 on default port 15001] DEBUG 
ipc.ProcessingDetails (Server.java:run(3071)) - Served: [Call#72 Retry#0 
org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocol.send from 
localhost:56447 / 127.0.0.1:56447] name=send user=sammi (auth:SIMPLE) 
details=enqueueTime=10083 queueTime=8042 handlerTime=34624 
processingTime=23494375 lockfreeTime=23494375 lockwaitTime=0 locksharedTime=0 
lockexclusiveTime=0 responseTime=190084
   2023-11-17 11:18:10,664 [IPC Server handler 2 on default port 15004] DEBUG 
ipc.ProcessingDetails (Server.java:run(3071)) - Served: [Call#71 Retry#0 
org.apache.hadoop.ozone.om.protocol.OzoneManagerPro
   ```
   
   



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