Skip to content

Commit

Permalink
Merge branch 'main' into fix-wikipedia-cockroackdb-limits
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Dec 14, 2023
2 parents 027aff9 + 5e44cbf commit bf2852c
Show file tree
Hide file tree
Showing 35 changed files with 349 additions and 36 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"huntertran.auto-markdown-toc",
"redhat.fabric8-analytics",
"vscjava.vscode-java-pack"
]
}
Expand Down
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ end_of_line = lf

[*.yml]
indent_size = 2

[*.java]
# https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation
indent_size = 2
# https://google.github.io/styleguide/javaguide.html#s4.4-column-limit
max_line_length = 100
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce and apply Google Java Style formatting (#416)
56e3191bf8df94dcdf226ae814a9aa2c08b931b9
43 changes: 34 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ jobs:
cache: 'maven'
distribution: 'temurin'

- name: Package with Maven
run: mvn -B package -P ${{matrix.profile}} --file pom.xml -DskipTests -D descriptors=src/main/assembly/tgz.xml
- name: Package and verify with Maven
run: |
mvn -B package verify -P ${{matrix.profile}} --file pom.xml -DskipTests -D descriptors=src/main/assembly/tgz.xml
- name: Upload TGZ artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -120,15 +121,17 @@ jobs:
run: |
# For templated benchmarks, we need to preload some data for the test since by design, templated benchmarks do not support the 'load' operation
# In this case, we load the tpcc data.
if [[ ${{matrix.benchmark}} == templated ]]; then
if [[ ${{matrix.benchmark}} == templated ]] || [[ ${{matrix.benchmark}} == tpcc ]]; then
# Disable synchronous mode for sqlite tpcc data loading to save some time.
java -jar benchbase.jar -b tpcc -c config/sqlite/sample_tpcc_nosync_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
# Run the templated benchmark.
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/sqlite/sample_${{matrix.benchmark}}_config.xml --create=false --load=false --execute=true --json-histograms results/histograms.json
else
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/sqlite/sample_${{matrix.benchmark}}_config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
elif [ ${{matrix.benchmark}} == resourcestresser ]; then
Expand All @@ -138,6 +141,7 @@ jobs:
elif [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand All @@ -149,6 +153,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# FIXME: Add tpch back in (#333).
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
mariadb: # https://hub.docker.com/_/mariadb
Expand Down Expand Up @@ -202,11 +207,13 @@ jobs:
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
elif [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand All @@ -218,7 +225,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
mysql: # https://hub.docker.com/_/mysql
image: mysql:latest
Expand Down Expand Up @@ -270,11 +277,13 @@ jobs:
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
elif [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand All @@ -286,7 +295,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb', 'templated' ]
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb', 'templated' ]
services:
oracle:
image: gvenzl/oracle-xe:21.3.0-slim-faststart
Expand Down Expand Up @@ -340,7 +349,9 @@ jobs:
else
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/oracle/sample_${{matrix.benchmark}}_config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.04
elif [ ${{matrix.benchmark}} == tatp ]; then
Expand All @@ -352,6 +363,7 @@ jobs:
elif [ ${{matrix.benchmark}} == wikipedia ]; then
ERRORS_THRESHOLD=0.02
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand Down Expand Up @@ -413,11 +425,13 @@ jobs:
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
elif [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand All @@ -429,7 +443,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
cockroach: # https://hub.docker.com/repository/docker/timveil/cockroachdb-single-node
image: timveil/cockroachdb-single-node:latest
Expand Down Expand Up @@ -460,14 +474,23 @@ jobs:

- name: Run benchmark
run: |
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/cockroachdb/sample_${{matrix.benchmark}}_config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
# For templated benchmarks, we need to preload some data for the test since by design, templated benchmarks do not support the 'load' operation
# In this case, we load the tpcc data.
if [[ ${{matrix.benchmark}} == templated ]]; then
java -jar benchbase.jar -b tpcc -c config/cockroachdb/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/cockroachdb/sample_${{matrix.benchmark}}_config.xml --create=false --load=false --execute=true --json-histograms results/histograms.json
else
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/cockroachdb/sample_${{matrix.benchmark}}_config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
fi
# FIXME: Reduce the error rate so we don't need these overrides.
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
elif [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand All @@ -479,8 +502,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO: add more benchmarks
#benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
# TODO: add auctionmark and seats benchmark
benchmark: [ 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'sibench', 'smallbank', 'tatp', 'tpcc', 'templated', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
sqlserver:
Expand Down Expand Up @@ -552,9 +574,11 @@ jobs:
fi
# FIXME: Reduce the error rate so we don't need these overrides.
results_benchmark=${{matrix.benchmark}}
if [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
fi
./scripts/check_latest_benchmark_results.sh $results_benchmark
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
## ----------------------------------------------------------------------------------
Expand Down Expand Up @@ -631,6 +655,7 @@ jobs:
"$image" -b "$benchmark" -c /tmp/config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
# Test that the results files were produced.
ls results/${benchmark}_*.csv
./scripts/check_latest_benchmark_results.sh ${benchmark}
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
done
# Publish the docker image if the build/test was successful.
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"EditorConfig.EditorConfig",
"github.vscode-pull-request-github",
"huntertran.auto-markdown-toc",
"redhat.fabric8-analytics",
"vscjava.vscode-java-pack"
]
}
60 changes: 60 additions & 0 deletions config/cockroachdb/sample_templated_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>COCKROACHDB</type>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:26257/benchbase?sslmode=disable&amp;ApplicationName=templated&amp;reWriteBatchedInserts=true</url>
<username>root</username>
<password></password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>
<batchsize>128</batchsize>

<!-- Note: these example template reuses TPC-C queries and data as a demonstration, but others are possible.
To test this sample as is, you must first run benchbase with parameters `load=true` and
`config=sample_tpcc_config.xml` to load the TPC-C data to the target database.
Other templated benchmarks need to ensure that the data is loaded manually prior to running the benchmark.
-->

<query_templates_file>data/templated/example.xml</query_templates_file>

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<time>10</time>
<rate>100</rate>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

<!-- Select all templates that are executed. -->
<transactiontypes>
<transactiontype>
<name>GetOrder</name>
</transactiontype>
<transactiontype>
<name>GetCust</name>
</transactiontype>
<transactiontype>
<name>GetCustNull</name>
</transactiontype>
<transactiontype>
<name>GetWarehouse</name>
</transactiontype>
<transactiontype>
<name>GetItemByPrice</name>
</transactiontype>
<transactiontype>
<name>UpdateItemPrice</name>
</transactiontype>
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
4 changes: 3 additions & 1 deletion config/mariadb/sample_templated_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<work>
<time>10</time>
<rate>100</rate>
<weights>20,20,10,10,10,10,10,10</weights>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

Expand All @@ -51,8 +51,10 @@
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
4 changes: 3 additions & 1 deletion config/mysql/sample_templated_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<work>
<time>10</time>
<rate>100</rate>
<weights>20,20,10,10,10,10,10,10</weights>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

Expand All @@ -51,8 +51,10 @@
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
13 changes: 12 additions & 1 deletion config/oracle/sample_templated_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<work>
<time>10</time>
<rate>100</rate>
<weights>30,20,10,30,10</weights>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

Expand All @@ -45,5 +45,16 @@
<transactiontype>
<name>GetItemByPrice</name>
</transactiontype>
<transactiontype>
<name>UpdateItemPrice</name>
</transactiontype>
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
4 changes: 3 additions & 1 deletion config/postgres/sample_templated_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<work>
<time>10</time>
<rate>100</rate>
<weights>20,20,10,10,10,10,10,10</weights>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

Expand All @@ -51,8 +51,10 @@
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
4 changes: 3 additions & 1 deletion config/sqlite/sample_templated_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<work>
<time>10</time>
<rate>100</rate>
<weights>20,20,10,10,10,10,10,10</weights>
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
</work>
</works>

Expand All @@ -49,8 +49,10 @@
<transactiontype>
<name>DeleteItem</name>
</transactiontype>
<!-- FIXME:
<transactiontype>
<name>InsertItem</name>
</transactiontype>
-->
</transactiontypes>
</parameters>
2 changes: 1 addition & 1 deletion config/sqlserver/sample_hyadapt_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@
<transactiontype>
<name>SumRecord10</name>
</transactiontype>

</transactiontypes>
</parameters>
Loading

0 comments on commit bf2852c

Please sign in to comment.