use of io.druid.segment.data.IndexedFloats 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 io.druid.segment.data.IndexedFloats in project druid by druid-io.
the class FloatCompressionBenchmark method readContinuous.
@Benchmark
public void readContinuous(Blackhole bh) throws IOException {
IndexedFloats indexedFloats = supplier.get();
int count = indexedFloats.size();
float sum = 0;
for (int i = 0; i < count; i++) {
sum += indexedFloats.get(i);
}
bh.consume(sum);
indexedFloats.close();
}
Aggregations