rich7420 commented on code in PR #11128:
URL: https://github.com/apache/ozone/pull/11128#discussion_r3886980432


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMPerformanceMetrics.java:
##########
@@ -166,20 +111,101 @@ public class OMPerformanceMetrics {
   @Metric(about = "Latency of the last snapshot incremental defragmentation 
operation in ms")
   private MutableGaugeLong snapshotDefragServiceIncLatencyMs;
 
-  @Metric(about = "ResolveBucketLink and ACL check latency for createKey in 
nanoseconds")
-  private MutableRate createKeyResolveBucketAndAclCheckLatencyNs;
-  
-  @Metric(about = "check quota for createKey in nanoseconds")
-  private MutableRate createKeyQuotaCheckLatencyNs;
-
-  @Metric(about = "Block allocation latency for createKey in nanoseconds")
-  private MutableRate createKeyAllocateBlockLatencyNs;
-
-  @Metric(about = "createKeyFailure latency in nanoseconds")
-  private MutableRate createKeyFailureLatencyNs;
-
-  @Metric(about = "creteKeySuccess latency in nanoseconds")
-  private MutableRate createKeySuccessLatencyNs;
+  public OMPerformanceMetrics() {
+    registry = new MetricsRegistry(SOURCE_NAME);
+    lookupLatencyNs = stat("LookupLatencyNs",

Review Comment:
   Metric names are now 44 hand-typed literals with no test, so a typo silently 
renames a metric. Could we add a parity test asserting the `NumOps`/`AvgTime` 
names via `MetricsAsserts` (as `TestOMHAMetrics` does)?



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