Search in sources :

Example 26 with IncrementalIndexSegment

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

the class ScanBenchmark method querySingleIncrementalIndex.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleIncrementalIndex(Blackhole blackhole, IncrementalIndexState state) {
    QueryRunner<ScanResultValue> runner = QueryBenchmarkUtil.makeQueryRunner(factory, SegmentId.dummy("incIndex"), new IncrementalIndexSegment(state.incIndex, SegmentId.dummy("incIndex")));
    Query effectiveQuery = query.withDataSource(new TableDataSource("incIndex")).withQuerySegmentSpec(new MultipleSpecificSegmentSpec(ImmutableList.of(new SegmentDescriptor(Intervals.ETERNITY, "dummy_version", 0)))).withOverriddenContext(ImmutableMap.of(ScanQuery.CTX_KEY_OUTERMOST, false));
    List<ScanResultValue> results = ScanBenchmark.runQuery(factory, runner, effectiveQuery);
    blackhole.consume(results);
}
Also used : MultipleSpecificSegmentSpec(org.apache.druid.query.spec.MultipleSpecificSegmentSpec) ScanQuery(org.apache.druid.query.scan.ScanQuery) Query(org.apache.druid.query.Query) TableDataSource(org.apache.druid.query.TableDataSource) IncrementalIndexSegment(org.apache.druid.segment.IncrementalIndexSegment) ScanResultValue(org.apache.druid.query.scan.ScanResultValue) SegmentDescriptor(org.apache.druid.query.SegmentDescriptor) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 27 with IncrementalIndexSegment

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

the class TimeseriesBenchmark method querySingleIncrementalIndex.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleIncrementalIndex(Blackhole blackhole, IncrementalIndexState state) {
    QueryRunner<Result<TimeseriesResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, SegmentId.dummy("incIndex"), new IncrementalIndexSegment(state.incIndex, SegmentId.dummy("incIndex")));
    List<Result<TimeseriesResultValue>> results = TimeseriesBenchmark.runQuery(factory, runner, query);
    blackhole.consume(results);
}
Also used : IncrementalIndexSegment(org.apache.druid.segment.IncrementalIndexSegment) 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 28 with IncrementalIndexSegment

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

the class SearchBenchmark method querySingleIncrementalIndex.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleIncrementalIndex(Blackhole blackhole, IncrementalIndexState state) {
    QueryRunner<SearchHit> runner = QueryBenchmarkUtil.makeQueryRunner(factory, SegmentId.dummy("incIndex"), new IncrementalIndexSegment(state.incIndex, SegmentId.dummy("incIndex")));
    List<Result<SearchResultValue>> results = SearchBenchmark.runQuery(factory, runner, query);
    blackhole.consume(results);
}
Also used : SearchHit(org.apache.druid.query.search.SearchHit) IncrementalIndexSegment(org.apache.druid.segment.IncrementalIndexSegment) 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 29 with IncrementalIndexSegment

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

the class TopNBenchmark method querySingleIncrementalIndex.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleIncrementalIndex(Blackhole blackhole, IncrementalIndexState state) {
    QueryRunner<Result<TopNResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, SegmentId.dummy("incIndex"), new IncrementalIndexSegment(state.incIndex, SegmentId.dummy("incIndex")));
    List<Result<TopNResultValue>> results = TopNBenchmark.runQuery(factory, runner, query);
    blackhole.consume(results);
}
Also used : IncrementalIndexSegment(org.apache.druid.segment.IncrementalIndexSegment) 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 30 with IncrementalIndexSegment

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

the class FilteredAggregatorBenchmark method querySingleIncrementalIndex.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleIncrementalIndex(Blackhole blackhole, IncrementalIndexState state) {
    QueryRunner<Result<TimeseriesResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, SegmentId.dummy("incIndex"), new IncrementalIndexSegment(state.incIndex, SegmentId.dummy("incIndex")));
    List<Result<TimeseriesResultValue>> results = FilteredAggregatorBenchmark.runQuery(factory, runner, query, vectorize);
    for (Result<TimeseriesResultValue> result : results) {
        blackhole.consume(result);
    }
}
Also used : TimeseriesResultValue(org.apache.druid.query.timeseries.TimeseriesResultValue) IncrementalIndexSegment(org.apache.druid.segment.IncrementalIndexSegment) Result(org.apache.druid.query.Result) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Aggregations

IncrementalIndexSegment (org.apache.druid.segment.IncrementalIndexSegment)46 QueryableIndexSegment (org.apache.druid.segment.QueryableIndexSegment)28 CountAggregatorFactory (org.apache.druid.query.aggregation.CountAggregatorFactory)27 Test (org.junit.Test)27 InitializedNullHandlingTest (org.apache.druid.testing.InitializedNullHandlingTest)25 DefaultDimensionSpec (org.apache.druid.query.dimension.DefaultDimensionSpec)21 GroupByQuery (org.apache.druid.query.groupby.GroupByQuery)21 GroupByQueryRunnerTest (org.apache.druid.query.groupby.GroupByQueryRunnerTest)21 ResultRow (org.apache.druid.query.groupby.ResultRow)20 LegacySegmentSpec (org.apache.druid.query.spec.LegacySegmentSpec)20 ExpressionVirtualColumn (org.apache.druid.segment.virtual.ExpressionVirtualColumn)15 IncrementalIndex (org.apache.druid.segment.incremental.IncrementalIndex)14 Result (org.apache.druid.query.Result)10 OnheapIncrementalIndex (org.apache.druid.segment.incremental.OnheapIncrementalIndex)10 ArrayList (java.util.ArrayList)6 QueryRunnerFactory (org.apache.druid.query.QueryRunnerFactory)6 Benchmark (org.openjdk.jmh.annotations.Benchmark)6 BenchmarkMode (org.openjdk.jmh.annotations.BenchmarkMode)6 OutputTimeUnit (org.openjdk.jmh.annotations.OutputTimeUnit)6 AggregatorFactory (org.apache.druid.query.aggregation.AggregatorFactory)4