org.apache.logging.log4j.perf.jmh
Class DebugDisabledBenchmark
java.lang.Object
org.apache.logging.log4j.perf.jmh.DebugDisabledBenchmark
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()
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DebugDisabledBenchmark
public DebugDisabledBenchmark()
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 c 1999-2014 Apache Software Foundation. All Rights Reserved. Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, and the Apache Logging project logo are trademarks of The Apache Software Foundation.