use of org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram in project druid by druid-io.
the class FixedHistogramBenchmark method mergeFixedSameBuckets.
@Benchmark
public void mergeFixedSameBuckets(Blackhole bh) {
FixedBucketsHistogram copy = fixedHistogram.getCopy();
copy.combineHistogram(fixedHistogram3);
bh.consume(copy);
}
use of org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram in project druid by druid-io.
the class FixedHistogramBenchmark method deserializeFixedSparseUpper.
@Benchmark
public void deserializeFixedSparseUpper(Blackhole bh) {
FixedBucketsHistogram fixedBucketsHistogram = FixedBucketsHistogram.fromBytes(fixedSparseUpperSerialized);
bh.consume(fixedBucketsHistogram);
}
use of org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram in project druid by druid-io.
the class FixedHistogramBenchmark method deserializeFixedFull.
@Benchmark
public void deserializeFixedFull(Blackhole bh) {
FixedBucketsHistogram fixedBucketsHistogram = FixedBucketsHistogram.fromBytes(fixedFullSerializedAlready);
bh.consume(fixedBucketsHistogram);
}
use of org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram in project druid by druid-io.
the class FixedHistogramAddBenchmark method addFixedHistoNormal.
@Benchmark
public void addFixedHistoNormal(Blackhole bh) {
fixedHistogramForAdds = new FixedBucketsHistogram(LOWER_LIMIT, UPPER_LIMIT, numBuckets, FixedBucketsHistogram.OutlierHandlingMode.OVERFLOW);
for (int i = 0; i < numEvents; i++) {
fixedHistogramForAdds.add(normalDistributionValues[i]);
}
bh.consume(fixedHistogramForAdds);
}
use of org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram in project druid by druid-io.
the class FixedHistogramAddBenchmark method setup.
@Setup
public void setup() {
randomValues = new int[numEvents];
Random r = ThreadLocalRandom.current();
for (int i = 0; i < numEvents; i++) {
randomValues[i] = r.nextInt(UPPER_LIMIT);
}
fixedHistogramForAdds = new FixedBucketsHistogram(LOWER_LIMIT, UPPER_LIMIT, numBuckets, FixedBucketsHistogram.OutlierHandlingMode.OVERFLOW);
NormalDistribution normalDistribution = new NormalDistribution(50000, 10000);
normalDistributionValues = new float[numEvents];
for (int i = 0; i < numEvents; i++) {
normalDistributionValues[i] = (float) normalDistribution.sample();
}
}
Aggregations