You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/19 10:41:23 UTC

[GitHub] [ozone] rakeshadr commented on a diff in pull request #3427: HDDS-6765. Get snapshot of write OMLockMetrics

rakeshadr commented on code in PR #3427:
URL: https://github.com/apache/ozone/pull/3427#discussion_r876900149


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/lock/OMLockMetrics.java:
##########
@@ -203,5 +203,7 @@ public void getMetrics(MetricsCollector collector, boolean all) {
     MetricsRecordBuilder builder = collector.addRecord(SOURCE_NAME);
     readLockHeldTimeMsStat.snapshot(builder, all);
     readLockWaitingTimeMsStat.snapshot(builder, all);
+    writeLockHeldTimeMsStat.snapshot(builder, all);
+    writeLockWaitingTimeMsStat.snapshot(builder, all);

Review Comment:
   Can we add a test case?. Probably you can refer: TestReplicationSupervisor
   ```
   
         MetricsCollectorImpl metricsCollector = new MetricsCollectorImpl();
         metrics.getMetrics(metricsCollector, true);
         Assert.assertEquals(1, metricsCollector.getRecords().size());
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org