use of org.openjdk.jmh.annotations.Benchmark in project druid by druid-io.
the class FloatCompressionBenchmark method readSkipping.
@Benchmark
public void readSkipping(Blackhole bh) throws IOException {
IndexedFloats indexedFloats = supplier.get();
int count = indexedFloats.size();
float sum = 0;
for (int i = 0; i < count; i += rand.nextInt(2000)) {
sum += indexedFloats.get(i);
}
bh.consume(sum);
indexedFloats.close();
}
use of org.openjdk.jmh.annotations.Benchmark in project druid by druid-io.
the class FilterPartitionBenchmark method stringRead.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void stringRead(Blackhole blackhole) throws Exception {
StorageAdapter sa = new QueryableIndexStorageAdapter(qIndex);
Sequence<Cursor> cursors = makeCursors(sa, null);
Sequence<List<String>> stringListSeq = readCursors(cursors, blackhole);
List<String> strings = Sequences.toList(Sequences.limit(stringListSeq, 1), Lists.<List<String>>newArrayList()).get(0);
for (String st : strings) {
blackhole.consume(st);
}
}
use of org.openjdk.jmh.annotations.Benchmark in project druid by druid-io.
the class FilterPartitionBenchmark method readWithExFnPostFilter.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void readWithExFnPostFilter(Blackhole blackhole) throws Exception {
Filter filter = new NoBitmapSelectorDimFilter("dimSequential", "super-199", JS_EXTRACTION_FN).toFilter();
StorageAdapter sa = new QueryableIndexStorageAdapter(qIndex);
Sequence<Cursor> cursors = makeCursors(sa, filter);
Sequence<List<String>> stringListSeq = readCursors(cursors, blackhole);
List<String> strings = Sequences.toList(Sequences.limit(stringListSeq, 1), Lists.<List<String>>newArrayList()).get(0);
for (String st : strings) {
blackhole.consume(st);
}
}
use of org.openjdk.jmh.annotations.Benchmark in project druid by druid-io.
the class BoundFilterBenchmark method matchNothingAlphaNumeric.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void matchNothingAlphaNumeric() {
final ImmutableBitmap bitmapIndex = NOTHING_ALPHANUMERIC.getBitmapIndex(selector);
Preconditions.checkState(bitmapIndex.size() == 0);
}
use of org.openjdk.jmh.annotations.Benchmark in project druid by druid-io.
the class BoundFilterBenchmark method matchHalfAlphaNumeric.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void matchHalfAlphaNumeric() {
final ImmutableBitmap bitmapIndex = HALF_ALPHANUMERIC.getBitmapIndex(selector);
Preconditions.checkState(bitmapIndex.size() > 0 && bitmapIndex.size() < cardinality);
}
Aggregations