From d1cd193c875d7db3c97d1770e98cde1b7d492f5e Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Thu, 24 Feb 2022 15:57:11 +0300 Subject: [PATCH 1/7] Upgraded commons-configuration version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78fb23a..35145ed 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ commons-configuration commons-configuration - 1.6 + 1.10 net.sf.opencsv From f38eb81b8a9fbf03fdb0477d08954b02f1bbcaac Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Fri, 25 Feb 2022 18:51:26 +0300 Subject: [PATCH 2/7] Reworked build script --- assembly/bin.xml | 36 +++++++++++ build.xml | 158 ----------------------------------------------- classpath.sh | 10 --- ivy.xml | 53 ---------------- ivysettings.xml | 10 --- pom.xml | 30 +++++++++ tpccbenchmark | 2 +- 7 files changed, 67 insertions(+), 232 deletions(-) create mode 100644 assembly/bin.xml delete mode 100644 build.xml delete mode 100755 classpath.sh delete mode 100644 ivy.xml delete mode 100644 ivysettings.xml diff --git a/assembly/bin.xml b/assembly/bin.xml new file mode 100644 index 0000000..6083887 --- /dev/null +++ b/assembly/bin.xml @@ -0,0 +1,36 @@ + + + + tar.gz + + + + + + config + config + + *.xml + + + + + + tpccbenchmark + LICENSE + README.md + log4j.properties + + + + + target + libs + + lib/*.jar + oltpbench-*.jar + + + + + \ No newline at end of file diff --git a/build.xml b/build.xml deleted file mode 100644 index 64dff8d..0000000 --- a/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/classpath.sh b/classpath.sh deleted file mode 100755 index d383091..0000000 --- a/classpath.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo -ne "build" -for i in `ls lib/*.jar`; do - # IMPORTANT: Make sure that we do not include hsqldb v1 - if [[ $i =~ .*hsqldb-1.* ]]; then - continue - fi - echo -ne ":$i" -done diff --git a/ivy.xml b/ivy.xml deleted file mode 100644 index 1bad0c8..0000000 --- a/ivy.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ivysettings.xml b/ivysettings.xml deleted file mode 100644 index aa911ee..0000000 --- a/ivysettings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 35145ed..855b364 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,28 @@ JAR with dependencies --> + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory}/lib + provided + false + false + true + + + + + + org.apache.maven.plugins maven-assembly-plugin @@ -42,6 +64,8 @@ jar-with-dependencies + assembly/bin.xml + tpcc @@ -86,6 +110,7 @@ org.hsqldb hsqldb-j5 2.0.0 + provided javax.persistence @@ -107,6 +132,11 @@ commons-configuration 1.10 + + commons-collections + commons-collections + 3.2.1 + net.sf.opencsv opencsv diff --git a/tpccbenchmark b/tpccbenchmark index 4a03fcf..b86c50c 100755 --- a/tpccbenchmark +++ b/tpccbenchmark @@ -1,3 +1,3 @@ #!/bin/bash memory='8G' -java -Xmx$memory -cp `./classpath.sh bin` -Dlog4j.configuration=log4j.properties com.oltpbenchmark.DBWorkload $@ +java -Xmx$memory -cp "libs/*" -Dlog4j.configuration=log4j.properties com.oltpbenchmark.DBWorkload $@ From 0591a679d865897d30176afc9614bcdd95d22c22 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Fri, 25 Feb 2022 19:33:50 +0300 Subject: [PATCH 3/7] Fixed documentation --- README.md | 66 +++++++++++++++++++++++++++++++++--------------- assembly/bin.xml | 15 ++++++++++- pom.xml | 2 +- 3 files changed, 60 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index e72f980..7e229a5 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,9 @@ features, e.g., per-transaction-type latency and throughput logs. ``` + Run the following commands to build: ```bash - ant bootstrap - ant resolve - ant build + mvn clean install ``` ++ Copy and unpack `target/tpcc.tar.gz` file on client machine ## Setup of the Database The DB connection details should be as follows: @@ -45,38 +44,63 @@ The workload descriptor works the same way as it does in the upstream branch and ## Running the Benchmark -A utility script (./tpccbenchmark) is provided for running the benchmark. The options are +A utility script `./tpccbenchmark` is provided for running the benchmark. The options are ``` --c,--config [required] Workload configuration file - --clear Clear all records in the database for this - benchmark - --create Initialize the database for this benchmark - --execute Execute the benchmark workload --h,--help Print this help - --histograms Print txn histograms - --load Load data using the benchmark's data loader --o,--output Output file (default System.out) - --runscript Run an SQL script --s,--sample Sampling window --v,--verbose Display Messages + -c,--config Workload configuration file + [default: config/workload_all.xml] + --clear Clear all records in the database + for this benchmark + --create Initialize the database for this + benchmark + --create-sql-procedures Creates the SQL procedures + --dir Directory containing the csv files + --enable-foreign-keys Whether to enable foregin keys + --execute Execute the benchmark workload + -gpc,--geopartitioned-config GeoPartitioning configuration file + [default: + config/geopartitioned_workload.xml] + -h,--help Print this help + --histograms Print txn histograms + -im,--interval-monitor Throughput Monitoring Interval in + milliseconds + --initial-delay-secs Delay in seconds for starting the + benchmark + --load Load data using the benchmark's data + loader + --loaderthreads Number of loader threads (default + 10) + --merge-results Merge results from various output + files + --nodes comma separated list of nodes + (default 127.0.0.1) + --num-connections Number of connections used + --output-raw Output raw data + --output-samples Output sample data + --start-warehouse-id Start warehouse id + --total-warehouses Total number of warehouses across + all executions + --vv Output verbose execute results + --warehouses Number of warehouses (default 10) + --warmup-time-secs Warmup time in seconds for the + benchmark ``` ## Example -The following command for example initiates a tpcc database (--create=true --load=true) and a then run a workload as described in config/workload_all.xml file. The results (latency, throughput) are summarized and written into two files: outputfile.res (aggregated) and outputfile.raw (detailed): +First step is to create tables and indexes, can be done by calling following command ``` -./tpccbenchmark -c config/workload_all.xml --create=true --load=true --execute=true -s 300 -o outputfile +./tpccbenchmark --nodes $COMMA_SEPARATED_IPS --create true --vv ``` -Since data loading can be a lengthy process, one could first create a and populate a database which can be reused for multiple experiments: +Since data loading can be a lengthy process,one can be used to populate a database which can be reused for multiple experiments: ``` -./tpccbenchmark -c config/workload_all.xml --create=true --load=true +./tpccbenchmark --nodes $COMMA_SEPARATED_IPS --load true --warehouses $WAREHOUSES --loaderthreads $LOADER_THREADS --vv ``` Then running an experiment could be simply done with the following command on a fresh or used database. ``` -./tpccbenchmark -c config/workload_all.xml --execute=true -s 300 -o outputfile +./tpccbenchmark--nodes $COMMA_SEPARATED_IPS --execute true --warehouses $WAREHOUSES --warmup-time-secs 30 --vv ``` diff --git a/assembly/bin.xml b/assembly/bin.xml index 6083887..bad7704 100644 --- a/assembly/bin.xml +++ b/assembly/bin.xml @@ -4,8 +4,11 @@ tar.gz + false + + config config @@ -14,6 +17,7 @@ + tpccbenchmark @@ -23,14 +27,23 @@ + target libs - lib/*.jar oltpbench-*.jar + + + target/libs + libs + + *.jar + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 855b364..2c86960 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ copy-dependencies - ${project.build.directory}/lib + ${project.build.directory}/libs provided false false From 1ba7eb0f1f44eb49123b836a051ff728f190fb57 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Fri, 25 Feb 2022 20:01:44 +0300 Subject: [PATCH 4/7] Fixed issue with folders in final tar.gz file --- assembly/bin.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assembly/bin.xml b/assembly/bin.xml index bad7704..dc33e42 100644 --- a/assembly/bin.xml +++ b/assembly/bin.xml @@ -11,7 +11,7 @@ config - config + tpcc/config *.xml @@ -19,6 +19,7 @@ + tpcc tpccbenchmark LICENSE @@ -30,7 +31,7 @@ target - libs + tpcc/libs oltpbench-*.jar @@ -39,7 +40,7 @@ target/libs - libs + tpcc/libs *.jar From 99422d77e51a5f6fb480f0d7667b06a544378bde Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Wed, 16 Mar 2022 00:18:23 +0300 Subject: [PATCH 5/7] Moved ant scripts back --- build.xml | 158 ++++++++++++++++++++++++++++++++++++++++++++++++ ivy.xml | 53 ++++++++++++++++ ivysettings.xml | 10 +++ 3 files changed, 221 insertions(+) create mode 100644 build.xml create mode 100644 ivy.xml create mode 100644 ivysettings.xml diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..64dff8d --- /dev/null +++ b/build.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ivy.xml b/ivy.xml new file mode 100644 index 0000000..1bad0c8 --- /dev/null +++ b/ivy.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ivysettings.xml b/ivysettings.xml new file mode 100644 index 0000000..aa911ee --- /dev/null +++ b/ivysettings.xml @@ -0,0 +1,10 @@ + + + + + + + + + + From f2f9b4e92af2bc1e543f7736a939869d5bd510d9 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Thu, 17 Mar 2022 11:04:27 +0300 Subject: [PATCH 6/7] Removed ant --- build.xml | 158 ------------------------------------------------ ivy.xml | 53 ---------------- ivysettings.xml | 10 --- 3 files changed, 221 deletions(-) delete mode 100644 build.xml delete mode 100644 ivy.xml delete mode 100644 ivysettings.xml diff --git a/build.xml b/build.xml deleted file mode 100644 index 64dff8d..0000000 --- a/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ivy.xml b/ivy.xml deleted file mode 100644 index 1bad0c8..0000000 --- a/ivy.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ivysettings.xml b/ivysettings.xml deleted file mode 100644 index aa911ee..0000000 --- a/ivysettings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - From f67e2b4731ddaffd607e4422ba6873dbfe6c2924 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Thu, 17 Mar 2022 12:40:49 +0300 Subject: [PATCH 7/7] Removed ant --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2c86960..4347979 100644 --- a/pom.xml +++ b/pom.xml @@ -10,8 +10,8 @@ jar - 1.10 - 1.10 + 1.8 + 1.8