[ https://issues.apache.org/jira/browse/LOG4J2-3459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515611#comment-17515611 ]
Carter Kozak commented on LOG4J2-3459: -------------------------------------- I’ve used jmh for this sort of thing using oneshot mode with zero warmup, one iteration, 1 thread, and N forks (the number of times to spin up a jvm). The benchmark body just need to trigger log4j init and maybe log a single event depending what we want to measure. The async profiler integration should give helpful data > Reduce use of class static initialization blocks > ------------------------------------------------ > > Key: LOG4J2-3459 > URL: https://issues.apache.org/jira/browse/LOG4J2-3459 > Project: Log4j 2 > Issue Type: Improvement > Components: API, Core > Reporter: Matt Sicker > Priority: Major > > There are numerous classes that use static initializer blocks to perform > computation for caching some results. These should all generally be deferred > until some other reference to the class such as instantiation of use of a > singleton getter method. -- This message was sent by Atlassian Jira (v8.20.1#820001)