diff --git a/.github/scripts/make-release-distro.sh b/.github/scripts/make-release-distro.sh index 8dc5e36f..3fa79def 100755 --- a/.github/scripts/make-release-distro.sh +++ b/.github/scripts/make-release-distro.sh @@ -8,6 +8,8 @@ set -o nounset # Create a tar file with the given version using the git project located in the # working directory. +# +# ex. .github/scripts/make-release-distro.sh 0.33.4 .github/distro if [[ $# != 2 ]]; then echo "$0: Missing release version or distro source argument" @@ -35,8 +37,11 @@ cp ${DISTRO_SOURCE}/* ${DISTRO_DEST} rm ${DISTRO_DEST}/dependency-pom.xml cp target/${ARTIFACT}.jar ${DISTRO_DEST}/libs/ cp target/${ARTIFACT}-tests.jar ${DISTRO_DEST}/libs/ +cp target/${ARTIFACT}-sources.jar ${DISTRO_DEST}/libs/ +cp target/${ARTIFACT}-javadoc.jar ${DISTRO_DEST}/libs/ echo "VERSION=${RELEASE_VERSION}" > ${DISTRO_DEST}/.env cd ${DISTRO_DEST} tar cvzf ../${ARTIFACT}.tar * .env + diff --git a/.github/workflows/publish-benchmarks.yml b/.github/workflows/publish-benchmarks.yml index c95e51cd..e406ce44 100644 --- a/.github/workflows/publish-benchmarks.yml +++ b/.github/workflows/publish-benchmarks.yml @@ -103,6 +103,8 @@ jobs: deephaven-benchmark-${{env.VERSION}}.tar deephaven-benchmark-${{env.VERSION}}-results.tar release-notes.md + deephaven-benchmark-${{env.VERSION}}-sources.jar + deephaven-benchmark-${{env.VERSION}}-javadoc.jar - name: Publish Github Release if: ${{ github.ref_name == 'main' }} diff --git a/pom.xml b/pom.xml index 6187853e..39eeb309 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,41 @@ - + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + install + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.10.1 + + *.connect,*.controller,*.generator,*.jfr,*.metric,*.run,*.util + public + true + + + + attach-javadocs + install + + jar + + + + + + com.diffplug.spotless spotless-maven-plugin 2.43.0 diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/CompareTestRunner.java b/src/it/java/io/deephaven/benchmark/tests/compare/CompareTestRunner.java index 52685321..755633f7 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/CompareTestRunner.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/CompareTestRunner.java @@ -17,12 +17,12 @@ * A wrapper for the Bench api that allows running tests for the purpose of comparing Deephaven to other products that * perform similar operations. It allows running Deephaven operations or using Deephaven as an agent to run command line * python tests in the same environment (e.g. Docker). - *

+ *

* One of two initializers must be called to set up which type of tests is desired; {@code initDeephaven()} or * {@code initPython()}. Deephaven tests run queries inside of Deephaven like the standard benchmarks. Python tests use * Deephaven as an agent to run python scripts from the command line by first installing required pip modules in a * python virtual environment and then running each test from there. - *

+ *

* Note: This runner requires test ordering, so it follows that tests in a single test class are meant to be run as a * group. This violates the standard Benchmark convention that every test be able to be run by itself. This is done for * practical purposes, though it is not ideal. diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/agg/AverageByTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/agg/AverageByTest.java index 7958127c..5a8ecacb 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/agg/AverageByTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/agg/AverageByTest.java @@ -10,9 +10,9 @@ * Product comparison tests for the average by group operation. Tests read the same parquet data. To avoid an unfair * advantage where some products may partition or group data during the read, parquet read time is included in the * benchmark results. - *

+ *

* Each test calculates two new average columns and groups by a string and an integer. - *

+ *

* Data generation only happens in the first tests, the Deephaven test. Tests can be run individually, but only after * the desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/distinct/DistinctTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/distinct/DistinctTest.java index cd1a57db..31cd7fff 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/distinct/DistinctTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/distinct/DistinctTest.java @@ -10,9 +10,9 @@ * Product comparison tests for the distinct (or select distinct) group operation. Tests read the same parquet data. To * avoid an unfair advantage where some products may partition or group data during the read, parquet read time is * included in the benchmark results. - *

+ *

* Each test produces a table result that contains rows unique according to a string and an integer. - *

+ *

* Data generation only happens in the first tests, the Deephaven test. Tests can be run individually, but only after * the desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/filter/FilterTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/filter/FilterTest.java index 33764b53..8330184a 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/filter/FilterTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/filter/FilterTest.java @@ -10,10 +10,10 @@ * Product comparison tests for filter (where) operations. Tests read the same parquet data. To avoid an unfair * advantage where some products may partition or group data during the read, parquet read time is included in the * benchmark results. - *

+ *

* Each test produces a table result filtered by three criteria; value is an exact string, value > an integer, value < * an integer. - *

+ *

* Data generation only happens in the first tests, the Deephaven test. Tests can be run individually, but only after * the desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/iterate/RowIteratorTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/iterate/RowIteratorTest.java index bb6eba2c..b591570a 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/iterate/RowIteratorTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/iterate/RowIteratorTest.java @@ -9,11 +9,11 @@ * Product comparison tests for iterating and summing table columns. Tests read the same parquet data. To avoid an * unfair advantage where some products may partition or group data during the read, parquet read time is included in * the benchmark results. - *

+ *

* Each test produces a table result containing one row with one column that is the total of the result of the sum of * two columns for each row. ex. sum((r1c1 + r1c2)..(rNc1 + rNc2)). This is achieved without creating an extra column to * hold the column sums. - *

+ *

* Data generation only happens in the first test, the Deephaven test. Tests can be run individually, but only after the * desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/join/InnerJoinTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/join/InnerJoinTest.java index 4fafdbb6..4dfc1376 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/join/InnerJoinTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/join/InnerJoinTest.java @@ -10,9 +10,9 @@ * Product comparison tests for inner join operations. Tests read the same parquet data. To avoid an unfair advantage * where some products may partition or group data during the read, parquet read time is included in the benchmark * results. - *

+ *

* Each test produces a table that is the result of two tables intersected by a string and an integer. - *

+ *

* Data generation only happens in the first tests, the Deephaven test. Tests can be run individually, but only after * the desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/compare/sort/SortTest.java b/src/it/java/io/deephaven/benchmark/tests/compare/sort/SortTest.java index c1c51841..35148889 100644 --- a/src/it/java/io/deephaven/benchmark/tests/compare/sort/SortTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/compare/sort/SortTest.java @@ -9,9 +9,9 @@ /** * Product comparison tests for sort operations. Tests read the same parquet data. To avoid an unfair advantage where * some products may partition or group data during the read, parquet read time is included in the benchmark results. - *

+ *

* Each test sorts a table by a string and an integer. - *

+ *

* Data generation only happens in the first tests, the Deephaven test. Tests can be run individually, but only after * the desired data has been generated. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/experimental/ExperimentalTestRunner.java b/src/it/java/io/deephaven/benchmark/tests/experimental/ExperimentalTestRunner.java index ff1c6c9a..70317470 100644 --- a/src/it/java/io/deephaven/benchmark/tests/experimental/ExperimentalTestRunner.java +++ b/src/it/java/io/deephaven/benchmark/tests/experimental/ExperimentalTestRunner.java @@ -14,7 +14,7 @@ * boilerplate logic like imports, parquet reads, time measurement logic, etc. Each test runs two tests; * one reading from a static parquet, and the other exercising ticking tables through the * AutotuningIncrementalReleaseFilter. - *

+ *

* Note: This class is for running tests in the experimental package. It will change as new experiments are * added and may require external setup (i.e. parquet files) to work. */ @@ -112,7 +112,7 @@ public void table(String name, long rowCount) { * Run the benchmark test according to the operation and the columns loaded from the source table. The name will * show in the benchmark result output. The expected row count, since tests can scale, is an upper bound what result * row count is expected. - *

+ *

* This method assembles and runs two queries according to the settings provided previously: static and incremental * release. Both runs are expected to produce the same resulting row count. * diff --git a/src/it/java/io/deephaven/benchmark/tests/experimental/mergescale/ScaleTestRunner.java b/src/it/java/io/deephaven/benchmark/tests/experimental/mergescale/ScaleTestRunner.java index 89570eda..775406a9 100644 --- a/src/it/java/io/deephaven/benchmark/tests/experimental/mergescale/ScaleTestRunner.java +++ b/src/it/java/io/deephaven/benchmark/tests/experimental/mergescale/ScaleTestRunner.java @@ -12,7 +12,7 @@ * This tests a sort operation based on generated rows of data. The expected row count is achieved by fully generating * the data to a parquet file or partially generating the data and merging that by tableFactor to get row * count. - *

+ *

* Note: For best results, use base and row counts that are highly divisible and clear like 1,000,000 so that the * tableFactor is a whole number. */ diff --git a/src/it/java/io/deephaven/benchmark/tests/internal/examples/stream/JoinTablesFromKafkaStreamTest.java b/src/it/java/io/deephaven/benchmark/tests/internal/examples/stream/JoinTablesFromKafkaStreamTest.java index 693dbf03..46192c0f 100644 --- a/src/it/java/io/deephaven/benchmark/tests/internal/examples/stream/JoinTablesFromKafkaStreamTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/internal/examples/stream/JoinTablesFromKafkaStreamTest.java @@ -44,7 +44,7 @@ public void setup() { * * This test is identical to {@link #joinTwoTablesFromKafkaStream_Shorthand} except without the use of * bench_api_ functions for Kafka consumers and table waiting. - *

+ *

* Properties (e.g. ${kafka.consumer.addr}) are automatically filled in during query execution. */ @Test @@ -116,7 +116,7 @@ with exclusive_lock(table): * * This test is identical to {@link #joinTwoTablesFromKafkaStream_Longhand} except without the use of * bench_api_ functions for Kafka consumers and table waiting. - *

+ *

* Properties (e.g. ${kafka.consumer.addr}) are automatically filled in during query execution. */ @Test diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/StandardTestRunner.java b/src/it/java/io/deephaven/benchmark/tests/standard/StandardTestRunner.java index 1175a8e7..7ac925c2 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/StandardTestRunner.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/StandardTestRunner.java @@ -51,7 +51,7 @@ public Bench api() { * Generate the given pre-defined tables according to the default data distribution defined by the * default.data.distribution property. The first table name provided will be the main * source table. - *

+ *

* This method should only be called once per test. * * @param names the table names @@ -81,7 +81,7 @@ public void table(String name, String distribution) { /** * Generate a pre-defined table and set a column grouping for the resulting table. The given table name will be used * as the main table used by subsequent queries. - *

+ *

* * @param name the table name to generate * @param groups @@ -163,7 +163,7 @@ public void test(String name, String operation, String... loadColumns) { *

  • If static test duration < scale.elapsed.time.target, scale row count and do it again
  • *
  • Run test with auto increment release filter according to the previously determined row count
  • *
  • Assert that both static and incremental result tables have the same number of rows
  • - *

    + *

    * * @param name the name of the test as it will show in the result file * @param expectedRowCount the max row count expected from the operation regardless of scale, or zero if the count diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/by/UngroupTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/by/UngroupTest.java index c39d502c..f20af151 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/by/UngroupTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/by/UngroupTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the groupBy table operation. Ungroups column content. It is the inverse of groupBy. * Ungroup unwraps columns containing Deephaven arrays or vectors. - *

    + *

    * Note: These tests do group then ungroup, since the data generator does not support arrays */ public class UngroupTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/formula/UserFormulaTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/formula/UserFormulaTest.java index 3b83b135..68cf5bc1 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/formula/UserFormulaTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/formula/UserFormulaTest.java @@ -6,10 +6,10 @@ /** * Standard tests for running user-defined functions. These tests are meant to be compared, and so use the same data. - *

    + *

    * Note: When scaling row count, vector size should not get bigger. That would cause more than one axis change and * invalidate any expected comparisons. - *

    + *

    * Note: The "No Hints" tests have casts to make them equivalent to the hints tests, otherwise the return value would * always be a PyObject and not really the same test. They use two formulas to achieve this, otherwise vectorization * would not happen on "No Hints" benchmarks. diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTickTest.java index 402bf0e9..85f3bbcc 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a tick-based exponential moving maximum for specified * columns and places the result into a new column for each row. - *

    + *

    * Note: This test must contain benchmarks and decay_ticks that are comparable to * EmMaxTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTimeTest.java index 3b568def..3f192207 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMaxTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a time-based exponential moving maximum for specified * columns and places the result into a new column for each row. - *

    + *

    * Note: This test must contain benchmarks and decay_time that are comparable to EmMaxTickTest */ public class EmMaxTimeTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTickTest.java index bb08bbea..615be21d 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a tick-based exponential moving minimum for specified * columns and places the result into a new column for each row. * - *

    + *

    * Note: This test must contain benchmarks and decay_time that are comparable to EmMinTickTest */ public class EmMinTickTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTimeTest.java index 63d0881b..488aa394 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmMinTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a time-based exponential moving minimum for specified * columns and places the result into a new column for each row. - *

    + *

    * Note: This test must contain benchmarks and decay_ticks that are comparable to * EmMinTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTickTest.java index 99b665ec..6091a754 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a tick-based exponential moving standard deviation for * specified columns and places the result into a new column for each row. * - *

    + *

    * Note: This test must contain benchmarks and decay_ticks that are comparable to * EmStdTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTimeTest.java index e15e8d88..2efe5064 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmStdTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a time-based exponential moving standard deviation for * specified columns and places the result into a new column for each row. * - *

    + *

    * Note: This test must contain benchmarks and decay_time that are comparable to EmStdTickTest */ public class EmStdTimeTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTickTest.java index e0f67388..f648b4ba 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a tick-based exponential moving average for specified * columns and places the result into a new column for each row. - *

    + *

    * Note: This test must contain benchmarks and decay_ticks that are comparable to EmaTimeTest */ public class EmaTickTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTimeTest.java index b44485ba..a2b54c13 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmaTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a time-based exponential moving average for specified * columns and places the result into a new column for each row. - *

    + *

    * Note: This test must contain benchmarks and decay_time that are comparable to EmaTickTest */ public class EmaTimeTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTickTest.java index 54f89c14..2b1a8795 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a tick-based exponential moving sum for specified columns * and places the result into a new column for each row. * - *

    + *

    * Note: This test must contain benchmarks and decay_ticks that are comparable to EmsTimeTest */ public class EmsTickTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTimeTest.java index ef011ea7..ff4542bd 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/EmsTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Calculates a time-based exponential moving average for specified * columns and places the result into a new column for each row. * - *

    + *

    * Note: This test must contain benchmarks and decay_time that are comparable to EmsTickTest */ public class EmsTimeTest { diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTickTest.java index 2ed8a348..d90ca8f0 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling average. The result table contains * additional columns with windowed rolling averages for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingAvgTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTimeTest.java index 4451fd2a..d4c96409 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingAvgTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling average. The result table contains * additional columns with windowed rolling averages for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingAvgTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTickTest.java index 71307f24..5f010ad7 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling count. The result table contains * additional columns with windowed rolling count1 for each specified column in the source table. - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingCountTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTimeTest.java index bd3fbc57..f863e94b 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingCountTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling count. The result table contains * additional columns with windowed rolling counts for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingCountTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTickTest.java index 4a63a3f6..70a23eed 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling group. The result table contains * additional columns with windowed rolling groups for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingGroupTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTimeTest.java index 622cb0cd..b9189cf7 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingGroupTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling group. The result table contains * additional columns with windowed rolling groups for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingGroupTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTickTest.java index 2a377338..19809ddf 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling maximum. The result table contains * additional columns with windowed rolling maximum for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingMaxTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTimeTest.java index 0ac92c6e..e8f1c25d 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMaxTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling maximum. The result table contains * additional columns with windowed rolling maximums for each specified column in the source table. - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingMaxTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTickTest.java index 04bdd3ef..e5950ba4 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling minimum. The result table contains * additional columns with windowed rolling minimums for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingMinTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTimeTest.java index 04fd7112..6957e87b 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingMinTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling minimum. The result table contains * additional columns with windowed rolling minimums for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingMinTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTickTest.java index e30a5ad6..4074898f 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling product. The result table contains * additional columns with windowed rolling product for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingProdTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTimeTest.java index 37a41d33..cd4b6921 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingProdTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling product. The result table contains * additional columns with windowed rolling products for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingProdTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTickTest.java index 854d9ff5..2122a7be 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling standard deviation. The result table * contains additional columns with windowed rolling standard deviations for each specified column in the source table. - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingStdTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTimeTest.java index a9b586a0..27a58020 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingStdTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling standard deviation. The result table * contains additional columns with windowed rolling standard deviations for each specified column in the source table. - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingStdTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTickTest.java index 16e19308..4b7c5855 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling sum. The result table contains * additional columns with windowed rolling sums for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingSumTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTimeTest.java index fe6c32ec..ca64432f 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingSumTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling sum. The result table contains * additional columns with windowed rolling sums for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingSumTickTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTickTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTickTest.java index 9874a8ae..e11cd178 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTickTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTickTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a tick-based rolling weighted-average. The result table * contains additional columns with windowed rolling weighted-averages for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_ticks/fwd_ticks that are comparable to * RollingWAvgTimeTest */ diff --git a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTimeTest.java b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTimeTest.java index 2c6806ae..b3a09347 100644 --- a/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTimeTest.java +++ b/src/it/java/io/deephaven/benchmark/tests/standard/updateby/RollingWAvgTimeTest.java @@ -7,7 +7,7 @@ /** * Standard tests for the updateBy table operation. Defines a time-based rolling weighted-average. The result table * contains additional columns with windowed rolling weighted-averages for each specified column in the source table. * - *

    + *

    * Note: This test must contain benchmarks and rev_time/fwd_time that are comparable to * RollingWAvgTickTest */ diff --git a/src/main/java/io/deephaven/benchmark/api/Bench.java b/src/main/java/io/deephaven/benchmark/api/Bench.java index ea1c5877..001494b7 100644 --- a/src/main/java/io/deephaven/benchmark/api/Bench.java +++ b/src/main/java/io/deephaven/benchmark/api/Bench.java @@ -17,19 +17,44 @@ /** * The root accessor class for the API. Use Bench.create(this) in a typical JUnit test to start things off - *

    + *

    * Bench API methods are not thread-safe, nor are they intended to be. It makes no sense to run benchmark tests in * parallel. If parallel tests are desired to shorten overall test time, use the standalone uber-jar and select separate * sets of test packages to run on different systems simultaneously. */ final public class Bench { + /** + * The root benchmark result directory + */ static final public Path rootOutputDir = Paths.get("results"); + /** + * The name of the benchmark results csv file + */ static final public String resultFileName = "benchmark-results.csv"; + /** + * The name of the benchmark metrics csv file + */ static final public String metricsFileName = "benchmark-metrics.csv"; + /** + * The name of the benchmark platform csv file + */ static final public String platformFileName = "benchmark-platform.csv"; + /** + * The profile that includes the properties defined in the properties file, system and startup + */ static final Profile profile = new Profile(); + /** + * The benchmark output directory for the current run + */ static final public Path outputDir = initializeOutputDirectory(); + + /** + * The starting point for the Bench API + * + * @param testInst the test case instance in operation + * @return the root of the Bench API for the given test + */ static public Bench create(Object testInst) { Bench v = new Bench(testInst.getClass()); v.setName(testInst.getClass().getSimpleName()); @@ -105,7 +130,7 @@ public boolean propertyAsBoolean(String name, String defaultValue) { /** * Get an integral property from the profile, System, Environment or return a default value. Values are specified to * match the following regular expression: - *

    + *

    * [0-9]+ ( nanos | nano | millis | milli | seconds | second | minutes | minute ) * * @param name the property name diff --git a/src/main/java/io/deephaven/benchmark/api/BenchLog.java b/src/main/java/io/deephaven/benchmark/api/BenchLog.java index df08eb71..3f4de79b 100644 --- a/src/main/java/io/deephaven/benchmark/api/BenchLog.java +++ b/src/main/java/io/deephaven/benchmark/api/BenchLog.java @@ -41,6 +41,7 @@ public void close() { /** * Add the log info that was collected during the test run * + * @param origin where the log info came from * @param info the log info (i.e. the docker log) */ public void add(String origin, String info) { @@ -53,7 +54,7 @@ public void add(String origin, String info) { /** * Set the name of the current test. This will be used at the beginning and end of the test's log info. - *

    + *

    * Note: The symbol "#" is used is some components like QueryLog to treat with special behavior. In * this log it is removed and treated like any other test heading. * diff --git a/src/main/java/io/deephaven/benchmark/api/BenchPlatform.java b/src/main/java/io/deephaven/benchmark/api/BenchPlatform.java index 234560a2..fa2b3ad0 100644 --- a/src/main/java/io/deephaven/benchmark/api/BenchPlatform.java +++ b/src/main/java/io/deephaven/benchmark/api/BenchPlatform.java @@ -48,6 +48,14 @@ public class BenchPlatform { this.profileProps = profileProps; } + /** + * Add a platform detail + * + * @param origin where the platform detail came from + * @param name name of the platform detail + * @param value value of the platform detail + * @return this instance + */ public BenchPlatform add(String origin, String name, Object value) { benchApiAddProperty(properties, origin, name, value); return this; diff --git a/src/main/java/io/deephaven/benchmark/api/BenchResult.java b/src/main/java/io/deephaven/benchmark/api/BenchResult.java index 610f0683..af5d9c00 100644 --- a/src/main/java/io/deephaven/benchmark/api/BenchResult.java +++ b/src/main/java/io/deephaven/benchmark/api/BenchResult.java @@ -36,7 +36,7 @@ final public class BenchResult { /** * Record a test rate for this result instance * - * @param the place where the measurement was collected + * @param origin the place where the measurement was collected * @param timer a started timer measuring the test * @param count the processed item count (e.g. rowCount) * @return this result instance @@ -50,7 +50,7 @@ public BenchResult test(String origin, Timer timer, long count) { * Record a test rate for this result instance * * @param origin the place where the measurement was collected - * @param timer a started timer measuring the test + * @param duration duration of the measured test * @param count the processed item count (e.g. rowCount) * @return this result instance */ diff --git a/src/main/java/io/deephaven/benchmark/api/BenchTable.java b/src/main/java/io/deephaven/benchmark/api/BenchTable.java index 1a1bf20a..3bc9f46b 100644 --- a/src/main/java/io/deephaven/benchmark/api/BenchTable.java +++ b/src/main/java/io/deephaven/benchmark/api/BenchTable.java @@ -75,7 +75,7 @@ public BenchTable withRowCount(long generatedRowCount) { /** * Set column names to be used for grouping where applicable (ex. parquet generation) * - * @param columns the grouping column names + * @param columnNames the grouping column names * @return this instance */ public BenchTable withColumnGrouping(String... columnNames) { @@ -122,12 +122,12 @@ public BenchTable withCompression(String codec) { /** * Configure this table to use a row count based on the column data ranges rather than the * scale.row.count property. - *

    + *

    * Note: This property will be ignored if withRowCount() is used or if no columns are defined with a * descending or ascending distribution * * @param isFixed true to fix the row count, otherwise false (default) - * @return + * @return this instance */ public BenchTable withFixedRowCount(boolean isFixed) { this.isFixed = isFixed; @@ -137,6 +137,7 @@ public BenchTable withFixedRowCount(boolean isFixed) { /** * Set a default column data distribution to use for columns that have no distribution set. * + * @param distro the name of the generator distribution random | ascending | descending | runlength * @return this instance */ public BenchTable withDefaultDistribution(String distro) { diff --git a/src/main/java/io/deephaven/benchmark/api/Profile.java b/src/main/java/io/deephaven/benchmark/api/Profile.java index 2d5e291e..c0a71f7f 100644 --- a/src/main/java/io/deephaven/benchmark/api/Profile.java +++ b/src/main/java/io/deephaven/benchmark/api/Profile.java @@ -106,7 +106,7 @@ boolean propertyAsBoolean(String name, String defaultValue) { /** * Get the value of the given property name as a Duration. Supported unit types are; nano, milli, second, minute. * Fractional amounts are not supported. - *

    + *

    * ex. 100000 nanos, 10 millis, 1 second, 5 minutes * * @param name a property name diff --git a/src/main/java/io/deephaven/benchmark/api/QueryLog.java b/src/main/java/io/deephaven/benchmark/api/QueryLog.java index 37552dad..b14b615e 100644 --- a/src/main/java/io/deephaven/benchmark/api/QueryLog.java +++ b/src/main/java/io/deephaven/benchmark/api/QueryLog.java @@ -60,7 +60,7 @@ public void close() { /** * Set the name of the current test. The query log records queries for a test class and denotes queries according to * user-supplied test names. - *

    + *

    * Note: The special character "#" is used to denote that this name is not a test name. This log uses it to denote * test setup, while other file handlers, like BenchResult, treat it as "skip recording results" * diff --git a/src/main/java/io/deephaven/benchmark/api/Snippets.java b/src/main/java/io/deephaven/benchmark/api/Snippets.java index 98af5f60..f491db77 100644 --- a/src/main/java/io/deephaven/benchmark/api/Snippets.java +++ b/src/main/java/io/deephaven/benchmark/api/Snippets.java @@ -7,7 +7,7 @@ class Snippets { /** * Provides a consumer to a kafka topic according to the APIs properties (e.g. kafka.consumer.addr) - *

    + *

    * ex. mytable = bench_api_kafka_consume('mytopic', 'append') * * @param topic a kafka topic name @@ -35,7 +35,7 @@ def bench_api_kafka_consume(topic: str, table_type: str): /** * Captures table size every Deephaven ticking interval and does not allow advancement in the current query logic * until the given table size is reached - *

    + *

    * ex. bench_api_await_table_size(table, 1000000) * * @param table the table to monitor @@ -55,7 +55,7 @@ with exclusive_lock(table): /** * Captures the value of the first column in a table every Deephaven ticking interval and does not allow advancement * in the current query logic until that value is reached - *

    + *

    * ex. bench_api_await_column_value_limit(table, 'count', 1000000) * * @param table the table to monitor @@ -75,7 +75,7 @@ with exclusive_lock(table): /** * Initialize the container for storing benchmark metrics - *

    + *

    * ex. bench_api_metrics_init() */ static String bench_api_metrics_init = """ @@ -87,7 +87,7 @@ def bench_api_metrics_init(): /** * Captures the value of the first column in a table every Deephaven ticking interval and does not allow advancement * in the current query logic until that value is reached - *

    + *

    * ex. bench_api_metrics_add('docker', 'restart.secs', 5.1, 'restart duration in between tests') * * @param category the metric category @@ -104,7 +104,7 @@ def bench_api_metrics_add(category, name, value, note=''): /** * Collect any metrics and turn them into a Deephaven table that can be fetched from the bench api. - *

    + *

    * ex. bench_api_metrics_table = bench_api_metrics_collect() */ static String bench_api_metrics_collect = """ diff --git a/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java b/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java index e6be5d93..f8f68625 100644 --- a/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java +++ b/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java @@ -37,7 +37,7 @@ /** * Client that communicates with the Deephaven Server, allows queries to be executed, and results to be retrieved. At * present, this connector only supports python queries. - *

    + *

    * The typical workflow will be initialize connection, execute query, fetch results, close. Note: This class is meant to * be used through the Bench api rather than directly. */ diff --git a/src/main/java/io/deephaven/benchmark/connect/CachedResultTable.java b/src/main/java/io/deephaven/benchmark/connect/CachedResultTable.java index dae9519a..6f93f980 100644 --- a/src/main/java/io/deephaven/benchmark/connect/CachedResultTable.java +++ b/src/main/java/io/deephaven/benchmark/connect/CachedResultTable.java @@ -15,7 +15,7 @@ * Create an in-memory table from either CSV or a Deephaven table. Provides some basic accessors for getting column * values. No data typing is done on import of the data. Use typed methods like {@code getNumber()} to convert from * whatever row value came from the import. - *

    + *

    * Note: This class is not a general purpose class for reading CSV or Deephaven Table data. It fits specific cases used * by the Benchmark framework. */ @@ -27,7 +27,7 @@ public class CachedResultTable implements ResultTable { * data types. * * @param csv basic csv with a header and columns - * @param delim + * @param delim the delimeter to use between columns * @return a cached result table instance */ static public ResultTable create(String csv, String delim) { diff --git a/src/main/java/io/deephaven/benchmark/connect/ResultTable.java b/src/main/java/io/deephaven/benchmark/connect/ResultTable.java index 154121f4..e1de7cf2 100644 --- a/src/main/java/io/deephaven/benchmark/connect/ResultTable.java +++ b/src/main/java/io/deephaven/benchmark/connect/ResultTable.java @@ -6,7 +6,7 @@ /** * Table used to fetch during or after executing a query through a connector (e.g. BarrageConnector) or * through the Bench API - *

    + *

    * ex. api.query(query).fetchAfter("myTableName", table -> { // do something }).execute(); */ public interface ResultTable { @@ -65,7 +65,7 @@ public interface ResultTable { * Return values for the given columns in the order they are listed * * @param rowIndex the row position starting at 0 - * @param columNames the column names to use for value retrieval + * @param columnNames the column names to use for value retrieval * @return the column values for the row */ public List getRow(int rowIndex, List columnNames); @@ -81,7 +81,7 @@ public interface ResultTable { /** * Return a string containing the Csv representation of this table. Allow setting column justification to right or * left depending on the 'R' or 'L' specified in the alignment description. - *

    + *

    * ex. "|", "LRRRRL" where there are 6 columns in the data * * @param delim the delimiter to use between column diff --git a/src/main/java/io/deephaven/benchmark/controller/Controller.java b/src/main/java/io/deephaven/benchmark/controller/Controller.java index f1ace929..2103d701 100644 --- a/src/main/java/io/deephaven/benchmark/controller/Controller.java +++ b/src/main/java/io/deephaven/benchmark/controller/Controller.java @@ -7,7 +7,7 @@ /** * Represents a mechanism that can manage the external service (e.g. Deephaven Engine) the benchmarks are running * against. This includes; start, stop, logging, etc. - *

    + *

    * Note: For now, this is not part of the Bench API but is used by runners that wrap the Bench API to provide normalized * behavior or generated data reuse. */ @@ -33,7 +33,6 @@ public interface Controller { *

  • If a service definition is supplied, wait for the service to be in a usable state
  • * * - * @param services the service names to load or none to load all * @return true if the service is running, otherwise false */ default public boolean startService() { @@ -47,6 +46,7 @@ default public boolean startService() { *
  • If a service definition is supplied, stop the service and clear state (e.g. logs)
  • * * + * @param servicePrefixes prefixes for names of services that will to be stopped * @return true if the service definition is specified, otherwise false */ public boolean stopService(Collection servicePrefixes); @@ -68,7 +68,7 @@ default public boolean stopService() { * Stop all services, cleanup state, and start services that match the given prefixes. Implementors can simply call * stopService followed by startService if desired. * - * @param services the service names to load or none to load all + * @param servicePrefixes the service names to load or none to load all * @return true if the service restarted, otherwise false */ public boolean restartService(Collection servicePrefixes); @@ -76,8 +76,7 @@ default public boolean stopService() { /** * Stop all services, cleanup state, and start all services. Implementors can simply call stopService * followed by startService if desired. - * - * @param services the service names to load or none to load all + * * @return true if the service restarted, otherwise false */ default public boolean restartService() { diff --git a/src/main/java/io/deephaven/benchmark/controller/DeephavenDockerController.java b/src/main/java/io/deephaven/benchmark/controller/DeephavenDockerController.java index 9e1035d3..aca0dddb 100644 --- a/src/main/java/io/deephaven/benchmark/controller/DeephavenDockerController.java +++ b/src/main/java/io/deephaven/benchmark/controller/DeephavenDockerController.java @@ -82,9 +82,9 @@ public boolean stopService(Collection keepServicePrefixes) { } /** - * Stop all services including Deephaven and start the services that match the given prefixes + * Stop all services, including Deephaven, and start the services that match the given prefixes * - * @param services the prefixes of the service names to load or none to load all + * @param servicePrefixes the prefixes of the service names to load or none to load all * @return true if the services were started, otherwise false */ @Override diff --git a/src/main/java/io/deephaven/benchmark/generator/ColumnDefs.java b/src/main/java/io/deephaven/benchmark/generator/ColumnDefs.java index 69f8f678..a2211eb4 100644 --- a/src/main/java/io/deephaven/benchmark/generator/ColumnDefs.java +++ b/src/main/java/io/deephaven/benchmark/generator/ColumnDefs.java @@ -8,16 +8,18 @@ * Contains column definitions used to generate data and schemas. Columns are described by name, type, and data range * (ex. "[1-100]", "str[1-100]ing"). Values are retrieved during data generation either randomly or incrementally * through the range. The same seed is used for random each time this class is instantiated. - *

    + *

    * Note: All possible data values are loaded up front to prevent object-creation during production. This can take a * considerable amount of memory for larger scales, especially for generated strings. - *

    */ public class ColumnDefs { final int valueCacheSize; final List columns = new ArrayList<>(); private String defaultDistribution = "random"; + /** + * Initialize the instance with a default cache size of 1024 + */ public ColumnDefs() { this(1024); } @@ -108,7 +110,7 @@ public ColumnDefs add(String name, String type, String valueDef) { * * @param columnIndex the index of the column * @param seed a value to use to get the next value (e.g. row id) - * @param the maximum value that could be used as a seed (e.g. row count) + * @param max the maximum value that could be used as a seed (e.g. row count) * @return the next value according to the column definition */ public Object nextValue(int columnIndex, long seed, long max) { @@ -117,7 +119,7 @@ public Object nextValue(int columnIndex, long seed, long max) { /** * Get the column definitions as a string. It intentionally avoids OS-specific line endings. - *

    + *

    * Note: This method is used to write table definitions for comparison to the file system. Do not change without * understanding the impact. * diff --git a/src/main/java/io/deephaven/benchmark/generator/DFunction.java b/src/main/java/io/deephaven/benchmark/generator/DFunction.java index e2f927d4..b511ff8c 100644 --- a/src/main/java/io/deephaven/benchmark/generator/DFunction.java +++ b/src/main/java/io/deephaven/benchmark/generator/DFunction.java @@ -10,7 +10,7 @@ * For example, a function returning a random value need only ensure that the value is found within the given * destination range. On the other hand, a scaling function would used source range and destination range to translate a * source value to a value within the destination range. - *

    + *

    * Note: In a practical sense, and from the perspective of usage in the columnDefs class, the distribution * functions do not return data values but indexes to data values. Put another way, the function return data positions. */ diff --git a/src/main/java/io/deephaven/benchmark/generator/Generator.java b/src/main/java/io/deephaven/benchmark/generator/Generator.java index d7bda491..9f9067db 100644 --- a/src/main/java/io/deephaven/benchmark/generator/Generator.java +++ b/src/main/java/io/deephaven/benchmark/generator/Generator.java @@ -19,7 +19,7 @@ public interface Generator { * for debugging) * @param maxRecordCount the maximum record count to produce * @param maxDurationSecs the maximum seconds to produce records - * @return + * @return a future contains metrics for the producer */ public Future produce(int perRecordPauseMillis, long maxRecordCount, int maxDurationSecs); diff --git a/src/main/java/io/deephaven/benchmark/jfr/JfrReader.java b/src/main/java/io/deephaven/benchmark/jfr/JfrReader.java index b13ecb0b..074d5b4a 100644 --- a/src/main/java/io/deephaven/benchmark/jfr/JfrReader.java +++ b/src/main/java/io/deephaven/benchmark/jfr/JfrReader.java @@ -8,7 +8,7 @@ import jdk.jfr.consumer.RecordedEvent; import jdk.jfr.consumer.RecordingFile; -public class JfrReader { +class JfrReader { final private URL url; JfrReader(URL url) { diff --git a/src/main/java/io/deephaven/benchmark/metric/Metrics.java b/src/main/java/io/deephaven/benchmark/metric/Metrics.java index 4fd7ae9e..5573d18b 100644 --- a/src/main/java/io/deephaven/benchmark/metric/Metrics.java +++ b/src/main/java/io/deephaven/benchmark/metric/Metrics.java @@ -20,7 +20,6 @@ public class Metrics { * * @param origin where the metrics came from (ex. myservice, myhost) * @param category groups these metrics with other metrics - * @param type identifies this set of metrics */ public Metrics(String origin, String category) { this(System.currentTimeMillis(), origin, category); @@ -44,6 +43,7 @@ public Metrics(long timestamp, String origin, String category) { * * @param metricName name of the metric * @param value numeric value of the metric + * @param notes optional notes to clarify the metric * @return this instance */ public Metrics set(String metricName, Number value, String... notes) { @@ -73,6 +73,12 @@ public String getNote(String metricName) { return (m != null) ? m.note() : null; } + /** + * Get a metric Map with the given name + * + * @param metricName the name of the metric to retrieve + * @return a Map containing the metric details + */ public Map getMetric(String metricName) { var v = getValue(metricName); var n = getNote(metricName); diff --git a/src/main/java/io/deephaven/benchmark/metric/MetricsFuture.java b/src/main/java/io/deephaven/benchmark/metric/MetricsFuture.java index 35c51b5a..570c2818 100644 --- a/src/main/java/io/deephaven/benchmark/metric/MetricsFuture.java +++ b/src/main/java/io/deephaven/benchmark/metric/MetricsFuture.java @@ -1,41 +1,77 @@ -/* Copyright (c) 2022-2023 Deephaven Data Labs and Patent Pending */ +/* Copyright (c) 2022-2024 Deephaven Data Labs and Patent Pending */ package io.deephaven.benchmark.metric; import java.util.concurrent.*; +/** + * A Future that contains the metrics collected during the task that the future corresponds to. + */ public class MetricsFuture implements Future { final private CountDownLatch latch = new CountDownLatch(1); final private Metrics metrics; + /** + * Initialize the future with a container to house metrics added during the corresponding task + * + * @param metrics the container where the metrics will be added + */ public MetricsFuture(Metrics metrics) { this.metrics = metrics; } + /** + * Tell the future it's done + */ public void done() { latch.countDown(); } + /** + * Cancel the task for this future (Always fails) + * + * @return false + */ @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; } + /** + * Since this future can't be cancelled, this works the same as isDone. + * + * @return true if done, otherwise false + */ @Override public boolean isCancelled() { return latch.getCount() < 1; } + /** + * Get whether or not the task is finished executing. + * + * @return true if the task is finished, otherwise false + */ @Override public boolean isDone() { return latch.getCount() < 1; } + /** + * Get the metrics set for the task. Wait until the task is done. + * + * @return the metrics provided with the task + */ @Override public Metrics get() throws InterruptedException, ExecutionException { latch.await(); return metrics; } + /** + * Get the metrics set for the task. Wait as long as the given timeout before. + * + * @return the metrics provided with the task + */ @Override public Metrics get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { latch.await(timeout, unit); diff --git a/src/main/java/io/deephaven/benchmark/run/BenchmarkMain.java b/src/main/java/io/deephaven/benchmark/run/BenchmarkMain.java index 8fbc1794..1c79b22d 100644 --- a/src/main/java/io/deephaven/benchmark/run/BenchmarkMain.java +++ b/src/main/java/io/deephaven/benchmark/run/BenchmarkMain.java @@ -9,10 +9,10 @@ /** * Main class for running the benchmark framework from the deephaven-benchmark artifact. This wraps the JUnit standalone * console launcher. - *

    + *

    * ex. java -Dbenchmark.profile=my-benchmark.properties -jar deephaven-benchmark-1.0-SNAPSHOT-standalone.jar -cp * my-tests.jar -p my.tests - *

    + *

    * In addition to running benchmark tests using the console launcher, this class creates a * benchmark-summary-results.csv that is a merge of any per-run results files that match * results/run-[A-za-z0-9]+/benchmark-results.csv relative to the working directory diff --git a/src/main/java/io/deephaven/benchmark/run/SvgSummary.java b/src/main/java/io/deephaven/benchmark/run/SvgSummary.java index c59b0f42..67ee422a 100644 --- a/src/main/java/io/deephaven/benchmark/run/SvgSummary.java +++ b/src/main/java/io/deephaven/benchmark/run/SvgSummary.java @@ -16,7 +16,7 @@ * Generates an SVG file from a template that contains variables (e.g. ${My Agg=>op_duration}) referencing * benchmark data from the benchmark result produced by the {@code ResultSummary}. If the benchmark results summary * contains more than one run, the values for the newest run are used. - *

    + *

    * Note: This class is used to transform the specific template format defined in {@code benchmark-summary.template.svg} * against the {@code benchmark-results.csv} file. It is not general-purpose nor bulletproof. * diff --git a/src/main/java/io/deephaven/benchmark/util/Classes.java b/src/main/java/io/deephaven/benchmark/util/Classes.java index ffd6fee9..b5621634 100644 --- a/src/main/java/io/deephaven/benchmark/util/Classes.java +++ b/src/main/java/io/deephaven/benchmark/util/Classes.java @@ -8,18 +8,18 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -public class Classes { +class Classes { final List jarPaths; - public Classes() { + Classes() { this(System.getProperty("java.class.path").split("[" + System.getProperty("path.separator") + "]")); } - public Classes(String... jarPaths) { + Classes(String... jarPaths) { this.jarPaths = Arrays.stream(jarPaths).filter(j -> j.endsWith(".jar")).toList(); } - public List getDuplicatesClasses() { + List getDuplicatesClasses() { var classes = new TreeMap(); for (String jarPath : jarPaths) { addClasses(jarPath, classes); @@ -27,7 +27,7 @@ public List getDuplicatesClasses() { return classes.values().stream().filter(c -> c.paths.size() > 1).map(c -> c.toString()).toList(); } - public List getJarsForClass(String className) { + List getJarsForClass(String className) { var classes = new TreeMap(); for (String jarPath : jarPaths) { addClasses(jarPath, classes); diff --git a/src/main/java/io/deephaven/benchmark/util/Exec.java b/src/main/java/io/deephaven/benchmark/util/Exec.java index 3f78ae2a..4a5addca 100644 --- a/src/main/java/io/deephaven/benchmark/util/Exec.java +++ b/src/main/java/io/deephaven/benchmark/util/Exec.java @@ -14,6 +14,7 @@ public class Exec { * Blindly execute a command in whatever shell Java decides is relevant. Throw exceptions on timeout, non-zero exit * code, or other general failures. * + * @param workingDir the path for the working dir where the command will be executed * @param command the shell command to run * @return the standard output of the process */ diff --git a/src/main/java/io/deephaven/benchmark/util/Ids.java b/src/main/java/io/deephaven/benchmark/util/Ids.java index b83d33d4..712e3724 100644 --- a/src/main/java/io/deephaven/benchmark/util/Ids.java +++ b/src/main/java/io/deephaven/benchmark/util/Ids.java @@ -44,9 +44,10 @@ static public boolean isRunId(Object id) { /** * Make a unique time-based identifier (not a UUID). Successive calls guarantee a unique name returned within a * single JVM. - *

    + *

    * ex. PREFIX.UIuyguJ.2cOP * + * @param prefix the prefix to apply to the generated unique name * @return the unique name */ static public String uniqueName(String prefix) { diff --git a/src/main/java/io/deephaven/benchmark/util/Log.java b/src/main/java/io/deephaven/benchmark/util/Log.java index 75e1a9be..1795cbd3 100644 --- a/src/main/java/io/deephaven/benchmark/util/Log.java +++ b/src/main/java/io/deephaven/benchmark/util/Log.java @@ -2,7 +2,16 @@ package io.deephaven.benchmark.util; // Basic log (worry about formatting later) +/** + * Basic log mechanism (Really a placeholder for now) + */ public class Log { + /** + * Log some info as a formmated set of values + * + * @param formattedMsg a format accepted by printf + * @param values values for the given message + */ static public void info(String formattedMsg, Object... values) { System.out.printf(formattedMsg, values); System.out.println(); diff --git a/src/main/java/io/deephaven/benchmark/util/Numbers.java b/src/main/java/io/deephaven/benchmark/util/Numbers.java index 3639f0fe..7a7199f8 100644 --- a/src/main/java/io/deephaven/benchmark/util/Numbers.java +++ b/src/main/java/io/deephaven/benchmark/util/Numbers.java @@ -71,7 +71,7 @@ static public String formatNumber(Object val, String pattern) { /** * Format a given byte count into Gigabytes. ex. 1g, 200g * - * @param bytes the byte count to convert + * @param val the byte count to convert * @return a string of the form 1g */ static public String formatBytesToGigs(Object val) { @@ -104,7 +104,7 @@ static public Number negate(Object val) { /** * Determine whether the given number is even or odd. - *

    + *

    * Note: While this method accepts any Number, even or odd for a decimal will be determined by the integral portion. * * @param val a number @@ -122,7 +122,8 @@ static public boolean isEven(Object val) { * Subtract the number in the given string from the given max offset and replace it in the string. * * @param value the string containing a number - * @param maxOffset the uppermost possible number the string may contain + * @param offset the uppermost possible number the string may contain + * @param size a size to add to the offset * @return a string with the number replaced by a number offset from the maximum */ static public Object offsetInString(Object value, long offset, long size) { @@ -147,7 +148,7 @@ static public String toBase62(Number num) { /** * Convert a Base 10 string to Base 62. Accepted values are positive digits. - *

    + *

    * Note: The results of this method should match the results of ./github/scripts/base58.sh exactly * * @param num the number to convert diff --git a/src/main/java/io/deephaven/benchmark/util/Threads.java b/src/main/java/io/deephaven/benchmark/util/Threads.java index 57c1f1d7..44dce80d 100644 --- a/src/main/java/io/deephaven/benchmark/util/Threads.java +++ b/src/main/java/io/deephaven/benchmark/util/Threads.java @@ -5,8 +5,17 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; +/** + * Provide help for using threads + */ public class Threads { + /** + * Make a named ExecutorService that uses a single thread + * + * @param threadName the thread name + * @return an ExecutorService service with one thread + */ static public ExecutorService single(String threadName) { return Executors.newSingleThreadExecutor(new ThreadFactory() { @Override @@ -16,6 +25,11 @@ public Thread newThread(Runnable r) { }); } + /** + * Pause the current thread of the given amount of milliseconds + * + * @param millis how long in millis to pause + */ static public void sleep(long millis) { try { Thread.sleep(millis);