ivandika3 opened a new pull request, #7692: URL: https://github.com/apache/hadoop/pull/7692
### Description of PR This patch is similar from [HDDS-13014](https://issues.apache.org/jira/browse/HDDS-13014). We can add a name normalization cache between the Hadoop metrics name and the Prometheus metrics name to prevent expensive regex matchings during the metric normalization conversion. ### How was this patch tested? Simple microbenchmark (see https://issues.apache.org/jira/secure/attachment/13076557/TestPrometheusMetricsSinkPerformance.java) ``` # With cache Warming up... WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.apache.hadoop.thirdparty.com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/Users/ivan.andika/.m2/repository/org/apache/hadoop/thirdparty/hadoop-shaded-guava/1.4.0/hadoop-shaded-guava-1.4.0.jar) WARNING: Please consider reporting this to the maintainers of class org.apache.hadoop.thirdparty.com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release Running performance test... Performance Test Results: Total test cases: 5 Total iterations: 100000 Total operations: 500000 Total time: 46.00 ms Average time per operation: 0.000 ms Process finished with exit code 0 # Without cache Warming up... Running performance test... Performance Test Results: Total test cases: 5 Total iterations: 100000 Total operations: 500000 Total time: 1181.00 ms Average time per operation: 0.002 ms ``` -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org