@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void querySingleQueryableIndex(Blackhole blackhole) throws Exception { final QueryRunner<Result<TimeseriesResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner( factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0))); List<Result<TimeseriesResultValue>> results = TimeseriesBenchmark.runQuery(factory, runner, query); for (Result<TimeseriesResultValue> result : results) { blackhole.consume(result); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void queryFilteredSingleQueryableIndex(Blackhole blackhole) throws Exception { final QueryRunner<Result<TimeseriesResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner( factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0))); DimFilter filter = new SelectorDimFilter("dimSequential", "399", null); Query filteredQuery = query.withDimFilter(filter); List<Result<TimeseriesResultValue>> results = TimeseriesBenchmark.runQuery(factory, runner, filteredQuery); for (Result<TimeseriesResultValue> result : results) { blackhole.consume(result); } }