Log4j 2
  1. Log4j 2
  2. LOG4J2-654

Use JMH for Log4j2 performance tests


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc2
    • Fix Version/s: 2.0-rc2
    • Component/s: None
    • Labels:


      I've been using JMH (http://openjdk.java.net/projects/code-tools/jmh/ ) for performance tests recently and I'm very impressed. JMH is developed by the Oracle java performance team and used internally by Oracle to performance tune the JVM and java core libraries.

      I would like to use JMH to start building a suite of performance tests for log4j2.

      I propose adding a log4j-perf module. This is where our performance test code would live. JMH microbenchmarks are very simple java classes with org.openjdk.jmh annotations. During the build, JMH generates code and that generated code, together with all dependencies are zipped up in a large uber-jar with the maven Shade plugin. You can then use java -jar microbenchmarks.jar to run performance tests.

      JMH is released under the GPL v2 license (incompatible with the Apache License v2) so we need to be careful not to include the generated microbenchmarks.jar or any other GPL files in the log4j distribution.

        Issue Links


          Remko Popma created issue -
          Remko Popma made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Remko Popma made changes -
          Link This issue relates to LOG4J2-250 [ LOG4J2-250 ]
          Remko Popma made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Matt Sicker made changes -
          Status Resolved [ 5 ] Closed [ 6 ]


            • Assignee:
              Remko Popma
              Remko Popma
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: