Search in sources :

Example 56 with QueryableIndexSegment

use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.

the class TopNTypeInterfaceBenchmark method querySingleQueryableIndexLongThenFloat.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexLongThenFloat(Blackhole blackhole) {
    QueryRunner<Result<TopNResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(qIndexes.get(0), Q_INDEX_SEGMENT_ID));
    List<Result<TopNResultValue>> results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
    for (Result<TopNResultValue> result : results) {
        blackhole.consume(result);
    }
    runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(qIndexes.get(0), Q_INDEX_SEGMENT_ID));
    results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, floatQuery);
    for (Result<TopNResultValue> result : results) {
        blackhole.consume(result);
    }
}
Also used : QueryableIndexSegment(org.apache.druid.segment.QueryableIndexSegment) TopNResultValue(org.apache.druid.query.topn.TopNResultValue) Result(org.apache.druid.query.Result) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 57 with QueryableIndexSegment

use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexStringThenLong.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexStringThenLong(Blackhole blackhole) {
    QueryRunner<ResultRow> runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    List<ResultRow> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
    runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
}
Also used : ResultRow(org.apache.druid.query.groupby.ResultRow) QueryableIndexSegment(org.apache.druid.segment.QueryableIndexSegment) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 58 with QueryableIndexSegment

use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexStringTwice.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexStringTwice(Blackhole blackhole) {
    QueryRunner<ResultRow> runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    List<ResultRow> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
    runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
}
Also used : ResultRow(org.apache.druid.query.groupby.ResultRow) QueryableIndexSegment(org.apache.druid.segment.QueryableIndexSegment) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 59 with QueryableIndexSegment

use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexLongOnly.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexLongOnly(Blackhole blackhole) {
    QueryRunner<ResultRow> runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    List<ResultRow> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
}
Also used : ResultRow(org.apache.druid.query.groupby.ResultRow) QueryableIndexSegment(org.apache.druid.segment.QueryableIndexSegment) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 60 with QueryableIndexSegment

use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexNumericOnly.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexNumericOnly(Blackhole blackhole) {
    QueryRunner<ResultRow> runner = QueryBenchmarkUtil.makeQueryRunner(factory, Q_INDEX_SEGMENT_ID, new QueryableIndexSegment(queryableIndexes.get(0), Q_INDEX_SEGMENT_ID));
    List<ResultRow> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, longFloatQuery);
    for (ResultRow result : results) {
        blackhole.consume(result);
    }
}
Also used : ResultRow(org.apache.druid.query.groupby.ResultRow) QueryableIndexSegment(org.apache.druid.segment.QueryableIndexSegment) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Aggregations

QueryableIndexSegment (org.apache.druid.segment.QueryableIndexSegment)96 Benchmark (org.openjdk.jmh.annotations.Benchmark)37 BenchmarkMode (org.openjdk.jmh.annotations.BenchmarkMode)37 OutputTimeUnit (org.openjdk.jmh.annotations.OutputTimeUnit)37 ResultRow (org.apache.druid.query.groupby.ResultRow)34 IncrementalIndexSegment (org.apache.druid.segment.IncrementalIndexSegment)28 Test (org.junit.Test)28 InitializedNullHandlingTest (org.apache.druid.testing.InitializedNullHandlingTest)26 CountAggregatorFactory (org.apache.druid.query.aggregation.CountAggregatorFactory)24 DefaultDimensionSpec (org.apache.druid.query.dimension.DefaultDimensionSpec)24 Result (org.apache.druid.query.Result)23 GroupByQueryRunnerTest (org.apache.druid.query.groupby.GroupByQueryRunnerTest)23 ArrayList (java.util.ArrayList)22 LegacySegmentSpec (org.apache.druid.query.spec.LegacySegmentSpec)21 GroupByQuery (org.apache.druid.query.groupby.GroupByQuery)20 ExpressionVirtualColumn (org.apache.druid.segment.virtual.ExpressionVirtualColumn)18 TopNResultValue (org.apache.druid.query.topn.TopNResultValue)17 QueryableIndex (org.apache.druid.segment.QueryableIndex)17 QueryRunner (org.apache.druid.query.QueryRunner)15 FinalizeResultsQueryRunner (org.apache.druid.query.FinalizeResultsQueryRunner)13