Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce templated benchmarks. #301

Merged
merged 95 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
5e9b202
Draft for templated benchmarks.
anjagruenheid Apr 20, 2023
59bf5d9
Update src/main/java/com/oltpbenchmark/benchmarks/templated/Templated…
anjagruenheid Apr 27, 2023
b6cebe2
Update src/main/java/com/oltpbenchmark/benchmarks/templated/util/Gene…
anjagruenheid Apr 27, 2023
7041b47
Address initial comments.
anjagruenheid Apr 27, 2023
385cb5f
Merge branch 'templated_benchmarks' of https://github.com/anjagruenhe…
anjagruenheid Apr 27, 2023
7b24a23
Add plugin definition.
anjagruenheid Apr 27, 2023
4dbb248
Add missing changes.
anjagruenheid Apr 27, 2023
9115389
Set parameter type as string
anjagruenheid Apr 27, 2023
a3ea10a
bugfix
anjagruenheid Apr 27, 2023
e49749f
Debugging parameter types/values.
anjagruenheid Apr 27, 2023
c8e1bc1
bugfix
anjagruenheid Apr 27, 2023
398cea2
more fixes
anjagruenheid Apr 27, 2023
6fc00dd
Change param value propagation.
anjagruenheid Apr 27, 2023
4ae2f05
Remove debugging messages.
anjagruenheid Apr 27, 2023
62fd06a
Update src/main/java/com/oltpbenchmark/benchmarks/templated/util/Trac…
anjagruenheid Apr 27, 2023
08d5dda
Merge branch 'main' into templated_benchmarks
bpkroth Apr 27, 2023
277d3ac
Update src/main/java/com/oltpbenchmark/benchmarks/templated/README.md
anjagruenheid Apr 28, 2023
7f12c52
Attempt to indrocue XML validation for templates.
anjagruenheid Apr 28, 2023
481b060
Merge branch 'templated_benchmarks' of https://github.com/anjagruenhe…
anjagruenheid Apr 28, 2023
7990a31
Fix template file and some minor comments.
anjagruenheid Apr 28, 2023
fc8845b
Simplifying names.
anjagruenheid Apr 28, 2023
5753221
bugfix
anjagruenheid Apr 28, 2023
26f94ff
Debugging reading the xml.
anjagruenheid Apr 28, 2023
e52bd6c
remove superfluous file.
anjagruenheid Apr 28, 2023
207c890
debugging
anjagruenheid Apr 28, 2023
f59cf4e
more debugging.
anjagruenheid Apr 28, 2023
ee7a334
trying to solve the problem
anjagruenheid Apr 28, 2023
017f109
Remove debugging information.
anjagruenheid Apr 28, 2023
d80910d
Adjust README to new names.
anjagruenheid Apr 28, 2023
4b57597
Merge branch 'main' into templated_benchmarks
bpkroth May 1, 2023
d618799
Merge branch 'main' into templated_benchmarks
anjagruenheid May 17, 2023
c49255e
Merge branch 'main' into templated_benchmarks
bpkroth Jun 26, 2023
c1b8ef0
Merge branch 'main' into templated_benchmarks
anjagruenheid Jun 27, 2023
db230bb
Merge branch 'main' into templated_benchmarks
anjagruenheid Jun 30, 2023
003e4bb
Merge branch 'main' into templated_benchmarks
anjagruenheid Aug 28, 2023
bf32eaf
Add templated benchmark to pipeline
anjagruenheid Aug 28, 2023
66e703e
Merge branch 'main' into templated_benchmarks
anjagruenheid Sep 19, 2023
f3cce57
Update .github/workflows/maven.yml
anjagruenheid Sep 21, 2023
bb26b11
Update data/templated/example.xml
anjagruenheid Sep 21, 2023
04fbb4b
Update config/sqlserver/sample_templated_config.xml
anjagruenheid Sep 21, 2023
43796ae
Minor rephrases.
anjagruenheid Sep 21, 2023
71ea51d
Fix execution error due to '--' in comment.
anjagruenheid Sep 21, 2023
0b8e205
Comment adjustment.
anjagruenheid Sep 21, 2023
643f2f0
Merge branch 'main' into templated_benchmarks
bpkroth Sep 21, 2023
dfb7d0e
markdown rendering cleanup, spelling, etc.
bpkroth Sep 21, 2023
4faaa0e
add templated benchmark support checks for postgres as well
bpkroth Sep 21, 2023
dc0a7d5
enable templated benchmark
bpkroth Sep 21, 2023
d3e26b3
Merge pull request #1 from bpkroth/templated_benchmarks
anjagruenheid Sep 22, 2023
2f24fbd
Update user name and password.
anjagruenheid Sep 22, 2023
80a19a4
Remove superfluous imports.
anjagruenheid Sep 22, 2023
683793d
Add a templated test for mysql.
anjagruenheid Sep 22, 2023
3211f75
Add MariaDB test to pipeline.
anjagruenheid Sep 22, 2023
4bee191
Add stripping to prevent integer errors.
anjagruenheid Sep 22, 2023
f7d5849
Debugging MariaDB issue.
anjagruenheid Sep 25, 2023
37c4e6d
Fix debugging example
anjagruenheid Sep 25, 2023
c933663
Merge branch 'main' into templated_benchmarks
anjagruenheid Sep 25, 2023
454d59b
More debugging.
anjagruenheid Sep 25, 2023
4afc764
Confirm that the query is the issue.
anjagruenheid Sep 25, 2023
22d5863
Reset and add explanation.
anjagruenheid Sep 25, 2023
b96bc10
Double checking hypothesis.
anjagruenheid Sep 25, 2023
1b89af9
add support for running templated benchmarks in the docker script loc…
bpkroth Sep 25, 2023
be1e02e
add support for testing on sqlite as well, and locally via docker
bpkroth Sep 25, 2023
8614a31
comments
bpkroth Sep 25, 2023
24cf859
add a test for floating point queries
bpkroth Sep 25, 2023
fa355d5
add a log
bpkroth Sep 25, 2023
a04ee5d
adding unit tests for templated benchmarks
bpkroth Sep 25, 2023
fe58cad
remove the extra space for csv parsing issues
bpkroth Sep 25, 2023
15de916
use the xml conf random seed
bpkroth Sep 25, 2023
5e4167d
wip: fixups
bpkroth Sep 25, 2023
5382b4f
remove the mariadb special case
bpkroth Sep 25, 2023
6977cca
reduce the scale factor on sqlite
bpkroth Sep 25, 2023
cc0019b
work to make the unit tests work
bpkroth Sep 25, 2023
cd3e27e
tweaks
bpkroth Sep 25, 2023
fc5d734
fixup
bpkroth Sep 25, 2023
c7cc7a2
Add warning for procedure class type.
anjagruenheid Sep 26, 2023
041ef09
Error instead of warning.
anjagruenheid Sep 26, 2023
4a59b04
cleanup comment
bpkroth Sep 26, 2023
d838a27
add another NULL test
bpkroth Sep 26, 2023
ba099e6
TODO/FIXME comments for supporting nullable params
bpkroth Sep 26, 2023
6631055
remove the strip
bpkroth Sep 26, 2023
79db3d3
comments, unused import
bpkroth Sep 26, 2023
3786be8
revert
bpkroth Sep 26, 2023
fabd76d
tweak
bpkroth Sep 26, 2023
7f6c7aa
Merge remote-tracking branch 'anja/templated_benchmarks' into templat…
bpkroth Sep 26, 2023
e8b77fd
Merge branch 'main' into templated_benchmarks
anjagruenheid Sep 27, 2023
f396bdc
Merge pull request #2 from bpkroth/templated_benchmarks
anjagruenheid Sep 27, 2023
058c515
Merge branch 'main' into templated_benchmarks
bpkroth Oct 2, 2023
80c6e6b
Merge remote-tracking branch 'anja/templated_benchmarks' into templat…
bpkroth Oct 2, 2023
681c0aa
enable templated benchmark for sqlite
bpkroth Oct 2, 2023
4ef15ad
disable synchronous loading for tpcc for sqlite for tempalted benchmark
bpkroth Oct 2, 2023
88f858f
fixups - can't override variables in java
bpkroth Oct 2, 2023
3e5a803
fixup
bpkroth Oct 2, 2023
dc0329d
path fixup
bpkroth Oct 2, 2023
bc96fca
path fixups
bpkroth Oct 2, 2023
fc7fbe0
fixes for sqlserver syntax - wants TOP instead of LIMIT
bpkroth Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 54 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
fail-fast: false
matrix:
# BROKEN: tpch
benchmark: [ 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
Expand All @@ -112,7 +112,16 @@ jobs:

- name: Run benchmark
run: |
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
# 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
bpkroth marked this conversation as resolved.
Show resolved Hide resolved
# 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.
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
Expand All @@ -134,7 +143,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
mariadb: # https://hub.docker.com/_/mariadb
image: mariadb:latest
Expand Down Expand Up @@ -176,7 +185,16 @@ jobs:
MARIADB_PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
mysql -h127.0.0.1 -P$MARIADB_PORT -uadmin -ppassword -e "DROP DATABASE IF EXISTS benchbase; CREATE DATABASE benchbase"
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/mariadb/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/mariadb/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/mariadb/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/mariadb/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.
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
Expand All @@ -194,7 +212,7 @@ jobs:
strategy:
fail-fast: false
matrix:
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'templated', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
mysql: # https://hub.docker.com/_/mysql
image: mysql:latest
Expand Down Expand Up @@ -235,7 +253,16 @@ jobs:
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
mysql -h127.0.0.1 -P$MYSQL_PORT -uadmin -ppassword -e "DROP DATABASE IF EXISTS benchbase; CREATE DATABASE benchbase"
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/mysql/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/mysql/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/mysql/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/mysql/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.
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
Expand All @@ -253,7 +280,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:
postgres: # https://hub.docker.com/_/postgres
image: postgres:latest
Expand Down Expand Up @@ -292,7 +319,16 @@ jobs:
run: |
PGPASSWORD=password dropdb -h localhost -U admin benchbase --if-exists
PGPASSWORD=password createdb -h localhost -U admin benchbase
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/postgres/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/postgres/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/postgres/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/postgres/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.
if [ ${{matrix.benchmark}} == auctionmark ]; then
ERRORS_THRESHOLD=0.02
Expand Down Expand Up @@ -362,7 +398,7 @@ jobs:
matrix:
# TODO: add more benchmarks
#benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'sibench', 'smallbank', 'tatp', 'tpcc', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
benchmark: [ 'epinions', 'hyadapt', 'noop', 'otmetrics', 'resourcestresser', 'sibench', 'smallbank', 'tatp', 'tpcc', 'templated', 'tpch', 'twitter', 'voter', 'wikipedia', 'ycsb' ]
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:latest
Expand Down Expand Up @@ -423,7 +459,15 @@ jobs:
- name: Run benchmark
# Note: user/pass should match those used in sample configs.
run: |
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/sqlserver/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/sqlserver/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/sqlserver/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/sqlserver/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.
if [ ${{matrix.benchmark}} == tatp ]; then
ERRORS_THRESHOLD=0.05
Expand Down
49 changes: 49 additions & 0 deletions config/mariadb/sample_templated_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>MARIADB</type>
<driver>org.mariadb.jdbc.Driver</driver>
<url>jdbc:mariadb://localhost:3306/benchbase?useServerPrepStmts</url>
<username>admin</username>
<password>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>30,20,10,30,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>
</transactiontypes>
</parameters>
49 changes: 49 additions & 0 deletions config/mysql/sample_templated_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>MYSQL</type>
<driver>com.mysql.cj.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/benchbase?rewriteBatchedStatements=true&amp;allowPublicKeyRetrieval=True&amp;sslMode=DISABLED</url>
<username>admin</username>
<password>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>30,20,10,30,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>
</transactiontypes>
</parameters>
1 change: 1 addition & 0 deletions config/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<plugin name="smallbank">com.oltpbenchmark.benchmarks.smallbank.SmallBankBenchmark</plugin>
<plugin name="hyadapt">com.oltpbenchmark.benchmarks.hyadapt.HYADAPTBenchmark</plugin>
<plugin name="otmetrics">com.oltpbenchmark.benchmarks.otmetrics.OTMetricsBenchmark</plugin>
<plugin name="templated">com.oltpbenchmark.benchmarks.templated.TemplatedBenchmark</plugin>
</plugins>
49 changes: 49 additions & 0 deletions config/postgres/sample_templated_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>POSTGRES</type>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/benchbase?sslmode=disable&amp;ApplicationName=templated&amp;reWriteBatchedInserts=true</url>
<username>admin</username>
<password>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>30,20,10,30,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>
</transactiontypes>
</parameters>
47 changes: 47 additions & 0 deletions config/sqlite/sample_templated_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>SQLITE</type>
<driver>org.sqlite.JDBC</driver>
<url>jdbc:sqlite:tpcc.db</url>
<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>30,20,10,30,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>
</transactiontypes>
</parameters>
2 changes: 1 addition & 1 deletion config/sqlite/sample_tpcc_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- Scale factor is the number of warehouses in TPCC -->
<scalefactor>1</scalefactor>

<!-- SQLITE only supports one writer thread -->
<loaderThreads>1</loaderThreads>

Expand Down
Loading