Search in sources :

Example 1 with StringBuilderEncoder

use of org.apache.logging.log4j.core.layout.StringBuilderEncoder in project logging-log4j2 by apache.

the class TextEncoderHelperBenchmark method textEncoderEncode.

@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public long textEncoderEncode() {
    final StringBuilderEncoder helper = getEncoder();
    helper.encode(BUFF_TEXT, destination);
    return destination.count;
}
Also used : StringBuilderEncoder(org.apache.logging.log4j.core.layout.StringBuilderEncoder) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Aggregations

StringBuilderEncoder (org.apache.logging.log4j.core.layout.StringBuilderEncoder)1 Benchmark (org.openjdk.jmh.annotations.Benchmark)1 BenchmarkMode (org.openjdk.jmh.annotations.BenchmarkMode)1 OutputTimeUnit (org.openjdk.jmh.annotations.OutputTimeUnit)1