From 7e7770061c33aa4dc72f2662e7cb55259a223114 Mon Sep 17 00:00:00 2001 From: Stan Brubaker <120737309+stanbrub@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:50:41 -0700 Subject: [PATCH] feat: Add PartitionBy Benchmarks (#381) --- .../tests/standard/by/PartitionByTest.java | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/by/PartitionByTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/by/PartitionByTest.java index ae7ff946..ee699aee 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/by/PartitionByTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/by/PartitionByTest.java @@ -7,7 +7,6 @@ /** * Standard tests for the partitionBy table operation. Divides a single table into subtables. */ -@Disabled public class PartitionByTest { final StandardTestRunner runner = new StandardTestRunner(this); @@ -17,21 +16,24 @@ void setup() { } @Test - void partitionBy1Group2Cols() { - var q = "source.partition_by(['key1']).get_constituent(['string1val'])"; - runner.test("PartitionBy- 1 Group 100 Unique Vals", 1, q, "key1", "num1"); + void partitionBy1Group() { + runner.setScaleFactors(44, 9); + var q = "source.partition_by(by=['key1']).table"; + runner.test("PartitionBy- 1 Group 100 Unique Vals", 100, q, "key1", "num1"); } - // @Test - // void partitionBy1Group2ColsLarge() { - // var q = "source.partition_by(['str3']).get_constituent(['val1string'])"; - // runner.test("PartitionBy- 1 Group 1M Unique Vals", 1000000, q, "str3", "int1M"); - // } - // - // @Test - // public void partitionBy2Group3Cols() { - // var q = "source.partition_by(by=['str1', 'str2'])"; - // runner.test("PartitionBy- 2 Group 160K Unique Combos", 160000, q, "str1", "str2", "int250"); - // } + @Test + void partitionBy2Groups() { + runner.setScaleFactors(8, 4); + var q = "source.partition_by(by=['key1', 'key2']).table"; + runner.test("PartitionBy- 2 Groups 10K Unique Combos", 10100, q, "key1", "key2", "num1"); + } + + @Test + void partitionBy3Groups() { + runner.setScaleFactors(4, 2); + var q = "source.partition_by(by=['key1', 'key2', 'key3']).table"; + runner.test("PartitionBy- 3 Groups 100K Unique Combos", 90900, q, "key1", "key2", "key3", "num1"); + } }