Skip to content

Commit

Permalink
update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
clintropolis committed Jul 31, 2024
1 parent cdf3c39 commit 4746212
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@
import java.util.concurrent.TimeUnit;

@State(Scope.Benchmark)
@Fork(value = 2)
@Warmup(iterations = 10)
@Measurement(iterations = 25)
@Fork(value = 1)
@Warmup(iterations = 5)
@Measurement(iterations = 15)
public class GroupByBenchmark
{
@Param({"2", "4"})
@Param({"4"})
private int numProcessingThreads;

@Param({"-1"})
Expand All @@ -141,7 +141,7 @@ public class GroupByBenchmark
@Param({"all", "day"})
private String queryGranularity;

@Param({"force", "false"})
@Param({"false", "true"})
private String vectorize;

private static final Logger log = new Logger(GroupByBenchmark.class);
Expand Down Expand Up @@ -514,7 +514,7 @@ public String getFormatString()
@State(Scope.Benchmark)
public static class IncrementalIndexState
{
@Param({"onheap", "offheap"})
@Param({"onheap"})
private String indexType;

IncrementalIndex incIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.druid.java.util.common.FileUtils;
import org.apache.druid.java.util.common.Intervals;
import org.apache.druid.java.util.common.concurrent.Execs;
import org.apache.druid.java.util.common.granularity.Granularities;
import org.apache.druid.java.util.common.granularity.Granularity;
import org.apache.druid.java.util.common.guava.Sequence;
import org.apache.druid.java.util.common.logger.Logger;
import org.apache.druid.query.Druids;
Expand Down Expand Up @@ -101,8 +101,8 @@

@State(Scope.Benchmark)
@Fork(value = 1)
@Warmup(iterations = 10)
@Measurement(iterations = 25)
@Warmup(iterations = 5)
@Measurement(iterations = 15)
public class TimeseriesBenchmark
{
@Param({"750000"})
Expand All @@ -114,6 +114,9 @@ public class TimeseriesBenchmark
@Param({"true", "false"})
private boolean descending;

@Param({"all", "hour"})
private String queryGranularity;

private static final Logger log = new Logger(TimeseriesBenchmark.class);
private static final int RNG_SEED = 9999;
private static final IndexMergerV9 INDEX_MERGER_V9;
Expand Down Expand Up @@ -162,7 +165,7 @@ private void setupQueries()
TimeseriesQuery queryA =
Druids.newTimeseriesQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.intervals(intervalSpec)
.aggregators(queryAggs)
.descending(descending)
Expand All @@ -182,7 +185,7 @@ private void setupQueries()
TimeseriesQuery timeFilterQuery =
Druids.newTimeseriesQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.intervals(intervalSpec)
.aggregators(queryAggs)
.descending(descending)
Expand All @@ -202,7 +205,7 @@ private void setupQueries()
TimeseriesQuery timeFilterQuery =
Druids.newTimeseriesQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.intervals(intervalSpec)
.aggregators(queryAggs)
.descending(descending)
Expand All @@ -219,7 +222,7 @@ private void setupQueries()
TimeseriesQuery timeFilterQuery =
Druids.newTimeseriesQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.intervals(intervalSpec)
.aggregators(queryAggs)
.descending(descending)
Expand Down Expand Up @@ -271,7 +274,7 @@ public void setup()
@State(Scope.Benchmark)
public static class IncrementalIndexState
{
@Param({"onheap", "offheap"})
@Param({"onheap"})
private String indexType;

IncrementalIndex incIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.druid.jackson.DefaultObjectMapper;
import org.apache.druid.java.util.common.FileUtils;
import org.apache.druid.java.util.common.concurrent.Execs;
import org.apache.druid.java.util.common.granularity.Granularities;
import org.apache.druid.java.util.common.granularity.Granularity;
import org.apache.druid.java.util.common.guava.Sequence;
import org.apache.druid.java.util.common.logger.Logger;
import org.apache.druid.offheap.OffheapBufferGenerator;
Expand Down Expand Up @@ -98,8 +98,8 @@

@State(Scope.Benchmark)
@Fork(value = 1)
@Warmup(iterations = 10)
@Measurement(iterations = 25)
@Warmup(iterations = 5)
@Measurement(iterations = 15)
public class TopNBenchmark
{
@Param({"750000"})
Expand All @@ -111,6 +111,9 @@ public class TopNBenchmark
@Param({"10"})
private int threshold;

@Param({"all", "hour"})
private String queryGranularity;

private static final Logger log = new Logger(TopNBenchmark.class);
private static final int RNG_SEED = 9999;
private static final IndexMergerV9 INDEX_MERGER_V9;
Expand Down Expand Up @@ -159,7 +162,7 @@ private void setupQueries()

TopNQueryBuilder queryBuilderA = new TopNQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.dimension("dimSequential")
.metric("sumFloatNormal")
.intervals(intervalSpec)
Expand All @@ -175,7 +178,7 @@ private void setupQueries()

TopNQueryBuilder queryBuilderA = new TopNQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.dimension("dimUniform")
.metric(new DimensionTopNMetricSpec(null, StringComparators.NUMERIC))
.intervals(intervalSpec)
Expand All @@ -191,7 +194,7 @@ private void setupQueries()

TopNQueryBuilder queryBuilderA = new TopNQueryBuilder()
.dataSource("blah")
.granularity(Granularities.ALL)
.granularity(Granularity.fromString(queryGranularity))
.dimension("dimUniform")
.metric(new DimensionTopNMetricSpec(null, StringComparators.ALPHANUMERIC))
.intervals(intervalSpec)
Expand Down Expand Up @@ -249,7 +252,7 @@ public void setup()
@State(Scope.Benchmark)
public static class IncrementalIndexState
{
@Param({"onheap", "offheap"})
@Param({"onheap"})
private String indexType;

IncrementalIndex incIndex;
Expand Down

0 comments on commit 4746212

Please sign in to comment.