use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class BoundFilterBenchmark method matchHalfLexicographic.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void matchHalfLexicographic() {
final ImmutableBitmap bitmapIndex = HALF_LEXICOGRAPHIC.getBitmapIndex(selector);
Preconditions.checkState(bitmapIndex.size() > 0 && bitmapIndex.size() < cardinality);
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project logging-log4j2 by apache.
the class ParameterizedMessageBenchmark method refactoredFormatTo.
@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public int refactoredFormatTo(final ThreadState state) {
state.buffer.setLength(0);
new ParameterizedMessage("pattern {} with {} two parameters and some text", ARGS).formatTo(state.buffer);
return state.buffer.length();
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project logging-log4j2 by apache.
the class TimeFormatBenchmark method fastDateFormatReuseStringBuilder.
@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public String fastDateFormatReuseStringBuilder(final BufferState state) {
state.stringBuilder.setLength(0);
fastDateFormat.format(new Date(), state.stringBuilder);
return new String(state.stringBuilder);
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project logging-log4j2 by apache.
the class TextEncoderHelperBenchmark method serializableMCD.
@Benchmark
@BenchmarkMode(Mode.SampleTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public long serializableMCD() {
final String str = PATTERN_M_C_D.toSerializable(EVENT);
final byte[] data = str.getBytes(CHARSET_DEFAULT);
ByteBuffer buff = destination.getByteBuffer();
if (buff.remaining() < data.length) {
buff = destination.drain(buff);
}
buff.put(data);
return destination.count;
}
Aggregations