org.apache.logging.log4j.perf.jmh

Class DebugDisabledBenchmark

  • Direct Known Subclasses:
    DebugDisabledBenchmark_jmh_B1


    public class DebugDisabledBenchmark
    extends Object
    Benchmarks Log4j 2, Log4j 1, and Logback using the DEBUG level which is disabled for this test. One of the primary performance concerns of logging frameworks is adding minimal overhead when logging is disabled. Some users disable all logging in production, while others disable finer logging levels in production. This benchmark demonstrates the overhead in calling logger.isDebugEnabled() and logger.debug().
    • Constructor Detail

      • DebugDisabledBenchmark

        public DebugDisabledBenchmark()
    • Method Detail

      • setUp

        public void setUp()
      • tearDown

        public void tearDown()
      • baseline

        public boolean baseline()
      • log4jIsDebugEnabled

        public boolean log4jIsDebugEnabled()
      • slf4jIsDebugEnabled

        public boolean slf4jIsDebugEnabled()
      • log4jClassicIsDebugEnabled

        public boolean log4jClassicIsDebugEnabled()
      • log4jDebugStringConcatenation

        public void log4jDebugStringConcatenation()
      • slf4jDebugStringConcatenation

        public void slf4jDebugStringConcatenation()
      • log4jClassicDebugStringConcatenation

        public void log4jClassicDebugStringConcatenation()
      • log4jDebugParameterizedString

        public void log4jDebugParameterizedString()
      • slf4jDebugParameterizedString

        public void slf4jDebugParameterizedString()

Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.