Apache logging services logo Apache log4j logo

CPD Results

The following document contains the results of PMD's CPD 5.0.5.

Duplications

FileLine
org/apache/logging/log4j/perf/jmh/Log4j2AsyncAppenderBenchmark.java69
org/apache/logging/log4j/perf/jmh/LogbackAsyncAppenderBenchmark.java71
            ((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);
    }
}
FileLine
org/apache/logging/log4j/perf/jmh/Log4j1AsyncAppenderBenchmark.java69
org/apache/logging/log4j/perf/jmh/Log4j2AsyncAppenderBenchmark.java69
org/apache/logging/log4j/perf/jmh/LogbackAsyncAppenderBenchmark.java71
            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);
    }
}