Search in sources :

Example 31 with OutputTimeUnit

use of org.openjdk.jmh.annotations.OutputTimeUnit 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)

Example 32 with OutputTimeUnit

use of org.openjdk.jmh.annotations.OutputTimeUnit in project logging-log4j2 by apache.

the class TextEncoderHelperBenchmark method byteArrayMCD.

@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public long byteArrayMCD() {
    final byte[] data = PATTERN_M_C_D.toByteArray(EVENT);
    ByteBuffer buff = destination.getByteBuffer();
    if (buff.remaining() < data.length) {
        buff = destination.drain(buff);
    }
    buff.put(data);
    return destination.count;
}
Also used : ByteBuffer(java.nio.ByteBuffer) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 33 with OutputTimeUnit

use of org.openjdk.jmh.annotations.OutputTimeUnit in project logging-log4j2 by apache.

the class MemoryHandlerJULLocationBenchmark method throughputSimple.

@Benchmark
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public void throughputSimple() {
    final LogRecord logRecord = new LogRecord(java.util.logging.Level.INFO, BenchmarkMessageParams.TEST);
    // force location
    logRecord.getSourceClassName();
    logger.log(logRecord);
}
Also used : LogRecord(java.util.logging.LogRecord) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 34 with OutputTimeUnit

use of org.openjdk.jmh.annotations.OutputTimeUnit in project grpc-java by grpc.

the class MethodDescriptorBenchmark method transportSpecific.

/** Foo bar. */
@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public AsciiString transportSpecific() {
    AsciiString path;
    if ((path = (AsciiString) imd.geRawMethodName(method)) != null) {
        path = new AsciiString("/" + method.getFullMethodName());
        imd.setRawMethodName(method, path);
    }
    return path;
}
Also used : AsciiString(io.netty.util.AsciiString) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 35 with OutputTimeUnit

use of org.openjdk.jmh.annotations.OutputTimeUnit in project grpc-java by grpc.

the class OutboundHeadersBenchmark method encodeClientHeaders.

/**
   * This will encode the random metadata fields, and repeatedly lookup the default other headers.
   */
@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public ByteBuf encodeClientHeaders() throws Exception {
    scratchBuffer.clear();
    Http2Headers headers = Utils.convertClientHeaders(metadata, scheme, defaultPath, authority, userAgent);
    headersEncoder.encodeHeaders(1, headers, scratchBuffer);
    return scratchBuffer;
}
Also used : Http2Headers(io.netty.handler.codec.http2.Http2Headers) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Aggregations

BenchmarkMode (org.openjdk.jmh.annotations.BenchmarkMode)94 OutputTimeUnit (org.openjdk.jmh.annotations.OutputTimeUnit)94 Benchmark (org.openjdk.jmh.annotations.Benchmark)93 QueryableIndexSegment (io.druid.segment.QueryableIndexSegment)37 Result (io.druid.query.Result)27 InputRow (io.druid.data.input.InputRow)26 Row (io.druid.data.input.Row)21 TopNResultValue (io.druid.query.topn.TopNResultValue)15 Cursor (io.druid.segment.Cursor)15 ArrayList (java.util.ArrayList)15 QueryableIndexStorageAdapter (io.druid.segment.QueryableIndexStorageAdapter)13 StorageAdapter (io.druid.segment.StorageAdapter)13 List (java.util.List)13 ImmutableBitmap (io.druid.collections.bitmap.ImmutableBitmap)12 BoundDimFilter (io.druid.query.filter.BoundDimFilter)10 DimFilter (io.druid.query.filter.DimFilter)10 OrDimFilter (io.druid.query.filter.OrDimFilter)9 SelectorDimFilter (io.druid.query.filter.SelectorDimFilter)9 AndDimFilter (io.druid.query.filter.AndDimFilter)8 FinalizeResultsQueryRunner (io.druid.query.FinalizeResultsQueryRunner)7