liran-funaro commented on a change in pull request #10593:
URL: https://github.com/apache/druid/pull/10593#discussion_r533154464
##########
File path:
benchmarks/src/test/java/org/apache/druid/benchmark/FilteredAggregatorBenchmark.java
##########
@@ -205,30 +184,106 @@ public void setup() throws IOException
GeneratorSchemaInfo basicSchema =
GeneratorBasicSchemas.SCHEMA_MAP.get("basic");
QuerySegmentSpec intervalSpec = new
MultipleIntervalSegmentSpec(Collections.singletonList(basicSchema.getDataInterval()));
- List<AggregatorFactory> queryAggs = new ArrayList<>();
- queryAggs.add(filteredMetrics[0]);
+ List<AggregatorFactory> queryAggs =
Collections.singletonList(filteredMetric);
query = Druids.newTimeseriesQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.intervals(intervalSpec)
.aggregators(queryAggs)
- .descending(false)
+ .descending(descending)
.build();
}
- @TearDown
- public void tearDown() throws IOException
+ @State(Scope.Benchmark)
+ public static class IncrementalIndexState
+ {
+ @Param({"onheap", "offheap"})
+ private String indexType;
+
+ IncrementalIndex<?> incIndex;
+
+ @Setup
+ public void setup(FilteredAggregatorBenchmark global) throws
JsonProcessingException
+ {
+ global.appendableIndexSpec =
IncrementalIndexCreator.parseIndexType(indexType);
Review comment:
Added.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]