use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class IndexPersistBenchmark method persist.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void persist(Blackhole blackhole) throws Exception {
File tmpDir = Files.createTempDir();
log.info("Using temp dir: " + tmpDir.getAbsolutePath());
try {
File indexFile = INDEX_MERGER.persist(incIndex, tmpDir, new IndexSpec());
blackhole.consume(indexFile);
} finally {
FileUtils.deleteDirectory(tmpDir);
}
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class GroupByBenchmark method querySingleQueryableIndex.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndex(Blackhole blackhole) throws Exception {
QueryRunner<Row> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", queryableIndexes.get(0)));
List<Row> results = GroupByBenchmark.runQuery(factory, runner, query);
for (Row result : results) {
blackhole.consume(result);
}
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class FilteredAggregatorBenchmark method ingest.
// Filtered agg doesn't work with ingestion, cardinality is not supported in incremental index
// See https://github.com/druid-io/druid/issues/3164
// @Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void ingest(Blackhole blackhole) throws Exception {
incIndexFilteredAgg = makeIncIndex(filteredMetrics);
for (InputRow row : inputRows) {
int rv = incIndexFilteredAgg.add(row);
blackhole.consume(rv);
}
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class TopNTypeInterfaceBenchmark method querySingleQueryableIndexStringThenLong.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexStringThenLong(Blackhole blackhole) throws Exception {
QueryRunner<Result<TopNResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0)));
List<Result<TopNResultValue>> results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, stringQuery);
for (Result<TopNResultValue> result : results) {
blackhole.consume(result);
}
runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0)));
results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
for (Result<TopNResultValue> result : results) {
blackhole.consume(result);
}
}
use of org.openjdk.jmh.annotations.OutputTimeUnit in project druid by druid-io.
the class TopNTypeInterfaceBenchmark method querySingleQueryableIndexLongTwice.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void querySingleQueryableIndexLongTwice(Blackhole blackhole) throws Exception {
QueryRunner<Result<TopNResultValue>> runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0)));
List<Result<TopNResultValue>> results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
for (Result<TopNResultValue> result : results) {
blackhole.consume(result);
}
runner = QueryBenchmarkUtil.makeQueryRunner(factory, "qIndex", new QueryableIndexSegment("qIndex", qIndexes.get(0)));
results = TopNTypeInterfaceBenchmark.runQuery(factory, runner, longQuery);
for (Result<TopNResultValue> result : results) {
blackhole.consume(result);
}
}
Aggregations