File | Line |
---|
org/apache/logging/log4j/perf/jmh/Log4j2AsyncAppenderBenchmark.java | 69 |
org/apache/logging/log4j/perf/jmh/LogbackAsyncAppenderBenchmark.java | 71 |
((LifeCycle) LogManager.getContext(false)).stop();
new File("perftest.log").delete();
}
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public boolean throughputBaseline(NormalState e) {
return e.logger.isInfoEnabled();
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public void throughput(NormalState e) {
e.logger.info(TEST);
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public boolean latencyBaseline(NormalState e) {
return e.logger.isInfoEnabled();
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void latency(NormalState e) {
e.logger.info(TEST);
}
} |
File | Line |
---|
org/apache/logging/log4j/perf/jmh/Log4j1AsyncAppenderBenchmark.java | 69 |
org/apache/logging/log4j/perf/jmh/Log4j2AsyncAppenderBenchmark.java | 69 |
org/apache/logging/log4j/perf/jmh/LogbackAsyncAppenderBenchmark.java | 71 |
LogManager.shutdown();
new File("perftest.log").delete();
}
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public boolean throughputBaseline(NormalState e) {
return e.logger.isInfoEnabled();
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public void throughput(NormalState e) {
e.logger.info(TEST);
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public boolean latencyBaseline(NormalState e) {
return e.logger.isInfoEnabled();
}
@GenerateMicroBenchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void latency(NormalState e) {
e.logger.info(TEST);
}
} |