Search in sources :

Example 41 with BenchmarkMode

use of org.openjdk.jmh.annotations.BenchmarkMode in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexFloatOnly.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexFloatOnly(Blackhole blackhole) throws Exception {
    QueryRunner<Row> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
    List<Row> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, floatQuery);
    for (Row result : results) {
        blackhole.consume(result);
    }
}
Also used : QueryableIndexSegment(io.druid.segment.QueryableIndexSegment) InputRow(io.druid.data.input.InputRow) Row(io.druid.data.input.Row) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 42 with BenchmarkMode

use of org.openjdk.jmh.annotations.BenchmarkMode in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexStringThenNumeric.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexStringThenNumeric(Blackhole blackhole) throws Exception {
    QueryRunner<Row> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
    List<Row> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
    for (Row result : results) {
        blackhole.consume(result);
    }
    runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
    results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, longFloatQuery);
    for (Row result : results) {
        blackhole.consume(result);
    }
}
Also used : QueryableIndexSegment(io.druid.segment.QueryableIndexSegment) InputRow(io.druid.data.input.InputRow) Row(io.druid.data.input.Row) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 43 with BenchmarkMode

use of org.openjdk.jmh.annotations.BenchmarkMode in project druid by druid-io.

the class GroupByTypeInterfaceBenchmark method querySingleQueryableIndexStringThenLong.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexStringThenLong(Blackhole blackhole) throws Exception {
    QueryRunner<Row> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
    List<Row> results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
    for (Row result : results) {
        blackhole.consume(result);
    }
    runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
    results = GroupByTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
    for (Row result : results) {
        blackhole.consume(result);
    }
}
Also used : QueryableIndexSegment(io.druid.segment.QueryableIndexSegment) InputRow(io.druid.data.input.InputRow) Row(io.druid.data.input.Row) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 44 with BenchmarkMode

use of org.openjdk.jmh.annotations.BenchmarkMode in project druid by druid-io.

the class IncrementalIndexRowTypeBenchmark method normalLongs.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@OperationsPerInvocation(maxRows)
public void normalLongs(Blackhole blackhole) throws Exception {
    for (int i = 0; i < maxRows; i++) {
        InputRow row = longRows.get(i);
        int rv = incIndex.add(row);
        blackhole.consume(rv);
    }
}
Also used : MapBasedInputRow(io.druid.data.input.MapBasedInputRow) InputRow(io.druid.data.input.InputRow) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OperationsPerInvocation(org.openjdk.jmh.annotations.OperationsPerInvocation) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Example 45 with BenchmarkMode

use of org.openjdk.jmh.annotations.BenchmarkMode in project druid by druid-io.

the class IncrementalIndexRowTypeBenchmark method normalFloats.

@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@OperationsPerInvocation(maxRows)
public void normalFloats(Blackhole blackhole) throws Exception {
    for (int i = 0; i < maxRows; i++) {
        InputRow row = floatRows.get(i);
        int rv = incFloatIndex.add(row);
        blackhole.consume(rv);
    }
}
Also used : MapBasedInputRow(io.druid.data.input.MapBasedInputRow) InputRow(io.druid.data.input.InputRow) BenchmarkMode(org.openjdk.jmh.annotations.BenchmarkMode) Benchmark(org.openjdk.jmh.annotations.Benchmark) OperationsPerInvocation(org.openjdk.jmh.annotations.OperationsPerInvocation) OutputTimeUnit(org.openjdk.jmh.annotations.OutputTimeUnit)

Aggregations

BenchmarkMode (org.openjdk.jmh.annotations.BenchmarkMode)97 Benchmark (org.openjdk.jmh.annotations.Benchmark)96 OutputTimeUnit (org.openjdk.jmh.annotations.OutputTimeUnit)94 QueryableIndexSegment (io.druid.segment.QueryableIndexSegment)37 Result (io.druid.query.Result)27 InputRow (io.druid.data.input.InputRow)26 Row (io.druid.data.input.Row)21 TopNResultValue (io.druid.query.topn.TopNResultValue)15 Cursor (io.druid.segment.Cursor)15 ArrayList (java.util.ArrayList)15 QueryableIndexStorageAdapter (io.druid.segment.QueryableIndexStorageAdapter)13 StorageAdapter (io.druid.segment.StorageAdapter)13 List (java.util.List)13 ImmutableBitmap (io.druid.collections.bitmap.ImmutableBitmap)12 BoundDimFilter (io.druid.query.filter.BoundDimFilter)10 DimFilter (io.druid.query.filter.DimFilter)10 OrDimFilter (io.druid.query.filter.OrDimFilter)9 SelectorDimFilter (io.druid.query.filter.SelectorDimFilter)9 AndDimFilter (io.druid.query.filter.AndDimFilter)8 FinalizeResultsQueryRunner (io.druid.query.FinalizeResultsQueryRunner)7