diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml
deleted file mode 100644
index 6f5bd30..0000000
--- a/.github/workflows/ant.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# This workflow will build a Java project with Ant
-# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
-
-name: Java CI
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK 11
- uses: actions/setup-java@v3
- with:
- java-version: '11'
- distribution: 'temurin'
- - name: Initialize the build system or project
- run: ant bootstrap
- - name: Resolve project dependencies
- run: ant resolve
- - name: Build with Ant
- run: ant build
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index d3a8c75..aa77afc 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -13,11 +13,11 @@ name: "CodeQL"
on:
push:
- branches: [ "master" ]
+ branches: ["master"]
pull_request:
- branches: [ "master" ]
+ branches: ["master"]
schedule:
- - cron: '41 9 * * 3'
+ - cron: "41 9 * * 3"
jobs:
analyze:
@@ -40,46 +40,40 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'java-kotlin', 'python' ]
+ language: ["java-kotlin", "python"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - name: Checkout repository
+ uses: actions/checkout@v4
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
- # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
- # If this step fails, then you should remove it and run the build manually (see below)
- # - name: Autobuild
- # uses: github/codeql-action/autobuild@v3
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- # âšī¸ Command-line programs to run using the OS shell.
- # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
- - run: |
- ant bootstrap
- ant resolve
- ant build
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
- with:
- category: "/language:${{matrix.language}}"
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..2e64686
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,34 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Java CI with Maven
+
+on:
+ push:
+ branches: ["master"]
+ pull_request:
+ branches: ["master"]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: "17"
+ distribution: "temurin"
+ cache: maven
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+
+ # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
+ - name: Update dependency graph
+ uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
diff --git a/.vscode/setting.json b/.vscode/setting.json
new file mode 100644
index 0000000..2e2c2cc
--- /dev/null
+++ b/.vscode/setting.json
@@ -0,0 +1,8 @@
+{
+ "files.watcherExclude": {
+ "**/target": true
+ },
+ "java.format.settings.profile": "GoogleStyle",
+ "java.format.enabled": true,
+ "editor.formatOnSaveMode": "modificationsIfAvailable"
+}
diff --git a/LICENSE b/LICENSE
index a195332..cd482d8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,12 +1,198 @@
-Copyright 2023 by Web3Bench Project
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
-This work was based on the OLxPBenchmark Project
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all
+other entities that control, are controlled by, or are under common
+control with that entity. For the purposes of this definition,
+"control" means (i) the power, direct or indirect, to cause the
+direction or management of such entity, whether by contract or
+otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation
+source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a
+copyright notice that is included in or attached to the work
+(an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object
+form, that is based on (or derived from) the Work and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship. For the purposes
+of this License, Derivative Works shall not include works that remain
+separable from, or merely link (or bind by name) to the interfaces of,
+the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including
+the original version of the Work and any modifications or additions
+to that Work or Derivative Works thereof, that is intentionally
+submitted to Licensor for inclusion in the Work by the copyright owner
+or by an individual or Legal Entity authorized to submit on behalf of
+the copyright owner. For the purposes of this definition, "submitted"
+means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems,
+and issue tracking systems that are managed by, or on behalf of, the
+Licensor for the purpose of discussing and improving the Work, but
+excluding communication that is conspicuously marked or otherwise
+designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work,
+where such license applies only to those patent claims licensable
+by such Contributor that are necessarily infringed by their
+Contribution(s) alone or by combination of their Contribution(s)
+with the Work to which such Contribution(s) was submitted. If You
+institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work
+or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate
+as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof in any medium, with or without
+modifications, and in Source or Object form, provided that You
+meet the following conditions:
+
+(a) You must give any other recipients of the Work or
+Derivative Works a copy of this License; and
+
+(b) You must cause any modified files to carry prominent notices
+stating that You changed the files; and
+
+(c) You must retain, in the Source form of any Derivative Works
+that You distribute, all copyright, patent, trademark, and
+attribution notices from the Source form of the Work,
+excluding those notices that do not pertain to any part of
+the Derivative Works; and
+
+(d) If the Work includes a "NOTICE" text file as part of its
+distribution, then any Derivative Works that You distribute must
+include a readable copy of the attribution notices contained
+within such NOTICE file, excluding those notices that do not
+pertain to any part of the Derivative Works, in at least one
+of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or
+documentation, if provided along with the Derivative Works; or,
+within a display generated by the Derivative Works, if and
+wherever such third-party notices normally appear. The contents
+of the NOTICE file are for informational purposes only and
+do not modify the License. You may add Your own attribution
+notices within Derivative Works that You distribute, alongside
+or as an addendum to the NOTICE text from the Work, provided
+that such additional attribution notices cannot be construed
+as modifying the License.
+
+You may add Your own copyright statement to Your modifications and
+may provide additional or different license terms and conditions
+for use, reproduction, or distribution of Your modifications, or
+for any such Derivative Works as a whole, provided Your use,
+reproduction, and distribution of the Work otherwise complies with
+the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
deleted file mode 100644
index cd482d8..0000000
--- a/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by
-the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all
-other entities that control, are controlled by, or are under common
-control with that entity. For the purposes of this definition,
-"control" means (i) the power, direct or indirect, to cause the
-direction or management of such entity, whether by contract or
-otherwise, or (ii) ownership of fifty percent (50%) or more of the
-outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity
-exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation
-source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical
-transformation or translation of a Source form, including but
-not limited to compiled object code, generated documentation,
-and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or
-Object form, made available under the License, as indicated by a
-copyright notice that is included in or attached to the work
-(an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object
-form, that is based on (or derived from) the Work and for which the
-editorial revisions, annotations, elaborations, or other modifications
-represent, as a whole, an original work of authorship. For the purposes
-of this License, Derivative Works shall not include works that remain
-separable from, or merely link (or bind by name) to the interfaces of,
-the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including
-the original version of the Work and any modifications or additions
-to that Work or Derivative Works thereof, that is intentionally
-submitted to Licensor for inclusion in the Work by the copyright owner
-or by an individual or Legal Entity authorized to submit on behalf of
-the copyright owner. For the purposes of this definition, "submitted"
-means any form of electronic, verbal, or written communication sent
-to the Licensor or its representatives, including but not limited to
-communication on electronic mailing lists, source code control systems,
-and issue tracking systems that are managed by, or on behalf of, the
-Licensor for the purpose of discussing and improving the Work, but
-excluding communication that is conspicuously marked or otherwise
-designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-this License, each Contributor hereby grants to You a perpetual,
-worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the
-Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-this License, each Contributor hereby grants to You a perpetual,
-worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-(except as stated in this section) patent license to make, have made,
-use, offer to sell, sell, import, and otherwise transfer the Work,
-where such license applies only to those patent claims licensable
-by such Contributor that are necessarily infringed by their
-Contribution(s) alone or by combination of their Contribution(s)
-with the Work to which such Contribution(s) was submitted. If You
-institute patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Work
-or a Contribution incorporated within the Work constitutes direct
-or contributory patent infringement, then any patent licenses
-granted to You under this License for that Work shall terminate
-as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-Work or Derivative Works thereof in any medium, with or without
-modifications, and in Source or Object form, provided that You
-meet the following conditions:
-
-(a) You must give any other recipients of the Work or
-Derivative Works a copy of this License; and
-
-(b) You must cause any modified files to carry prominent notices
-stating that You changed the files; and
-
-(c) You must retain, in the Source form of any Derivative Works
-that You distribute, all copyright, patent, trademark, and
-attribution notices from the Source form of the Work,
-excluding those notices that do not pertain to any part of
-the Derivative Works; and
-
-(d) If the Work includes a "NOTICE" text file as part of its
-distribution, then any Derivative Works that You distribute must
-include a readable copy of the attribution notices contained
-within such NOTICE file, excluding those notices that do not
-pertain to any part of the Derivative Works, in at least one
-of the following places: within a NOTICE text file distributed
-as part of the Derivative Works; within the Source form or
-documentation, if provided along with the Derivative Works; or,
-within a display generated by the Derivative Works, if and
-wherever such third-party notices normally appear. The contents
-of the NOTICE file are for informational purposes only and
-do not modify the License. You may add Your own attribution
-notices within Derivative Works that You distribute, alongside
-or as an addendum to the NOTICE text from the Work, provided
-that such additional attribution notices cannot be construed
-as modifying the License.
-
-You may add Your own copyright statement to Your modifications and
-may provide additional or different license terms and conditions
-for use, reproduction, or distribution of Your modifications, or
-for any such Derivative Works as a whole, provided Your use,
-reproduction, and distribution of the Work otherwise complies with
-the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-any Contribution intentionally submitted for inclusion in the Work
-by You to the Licensor shall be under the terms and conditions of
-this License, without any additional terms or conditions.
-Notwithstanding the above, nothing herein shall supersede or modify
-the terms of any separate license agreement you may have executed
-with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-names, trademarks, service marks, or product names of the Licensor,
-except as required for reasonable and customary use in describing the
-origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-agreed to in writing, Licensor provides the Work (and each
-Contributor provides its Contributions) on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-implied, including, without limitation, any warranties or conditions
-of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any
-risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-whether in tort (including negligence), contract, or otherwise,
-unless required by applicable law (such as deliberate and grossly
-negligent acts) or agreed to in writing, shall any Contributor be
-liable to You for damages, including any direct, indirect, special,
-incidental, or consequential damages of any character arising as a
-result of this License or out of the use or inability to use the
-Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all
-other commercial damages or losses), even if such Contributor
-has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-the Work or Derivative Works thereof, You may choose to offer,
-and charge a fee for, acceptance of support, warranty, indemnity,
-or other liability obligations and/or rights consistent with this
-License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf
-of any other Contributor, and only if You agree to indemnify,
-defend, and hold each Contributor harmless for any liability
-incurred by, or claims asserted against, such Contributor by reason
-of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-To apply the Apache License to your work, attach the following
-boilerplate notice, with the fields enclosed by brackets "[]"
-replaced with your own identifying information. (Don't include
-the brackets!) The text should be enclosed in the appropriate
-comment syntax for the file format. We also recommend that a
-file or class name and description of purpose be included on the
-same "printed page" as the copyright notice for easier
-identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/README.md b/README.md
index bfe2c7f..c5459d2 100755
--- a/README.md
+++ b/README.md
@@ -6,22 +6,32 @@ Our data model is a simplified version of Ethereum's decentralized blockchain, e
The benchmark encompasses a spectrum of tasks, including transactional, analytical, and online serving scenarios. It accommodates real-time and online activities with high query rates, while also executing batch tasks once during testing. Using a specialized driver, Web3Bench assesses both latency and throughput. As a proof of concept, we've successfully demonstrated its application on the [TiDB](https://github.com/pingcap/tidb) platform.
-## Environment Setup
+## Prerequisites
-- Install Java (v1.7 or newer) and Apache Ant.
-- Deploy TiDB cluster following the [TiDB documentation](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb).
- - If you want to test Web3Bench on TiDB, you can use the following commands to set or unlimit the memory quota for queries and server according to your environment.
+Before you begin, ensure you have the following prerequisites installed:
- ```sql
- SET GLOBAL tidb_mem_quota_query=0;
- SET GLOBAL tidb_server_memory_limit=0;
- ```
+- Java 11
+- Apache Maven 3.6.3
+- Python3 (3.8 or later)
-- Install required Python packages (tested on Python 3.8.10 & 3.8.18)
+### Setting up TiDB Cluster
- ```bash
- pip3 install -r requirements.txt
- ```
+To deploy a TiDB cluster, refer to the [TiDB documentation](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb).
+
+If you want to test Web3Bench on TiDB, you can use the following commands to set or unlimit the memory quota for queries and server according to your environment.
+
+```sql
+SET GLOBAL tidb_mem_quota_query=0;
+SET GLOBAL tidb_server_memory_limit=0;
+```
+
+### Installing Python Dependencies
+
+```bash
+pip3 install -r requirements.txt
+```
+
+> Note: Other versions of the prerequisites have not been fully tested and may encounter unknown issues.
## Quick Start Guide
@@ -66,23 +76,13 @@ If you encounter issues during the process, refer to the following troubleshooti
cd [Web3Bench.dir]
```
-2. Bootstrap the project using Ant
-
- ```bash
- ant bootstrap
- ```
-
-3. Resolve project dependencies
+2. Run the following command to compile the project:
```bash
- ant resolve
+ mvn clean package
```
-4. Build the project
-
- ```bash
- ant build
- ```
+Make sure you execute these commands in the root directory of your project.
## Config
@@ -93,6 +93,7 @@ If you encounter issues during the process, refer to the following troubleshooti
- To adjust database settings such as name, access credentials, scaling factor, test duration, etc., edit the top section of the script:
```shell
+ # Values to modify
###########################################################
# Database type: mysql, tidb, or sdb (singlestoredb)
dbtype=tidb
@@ -106,13 +107,12 @@ If you encounter issues during the process, refer to the following troubleshooti
new_username=root
new_password=
new_nodeid="main"
- new_scalefactor=6000
+ new_scalefactor=3
# Test time in minutes
- new_time=60
- # terminals and rate for runthread1: R1, W1* and W4
+ new_time=5
+ # terminals and rate for runthread1: R1, W1*, W4 and W6
new_terminals_thread1=30
- # Total number of requests in one hour for R1 = 1000 * 6000 = 6000000
- # then total rate per minute of thread1 = 1000 * 6000 / 80% / 60 = 1000 * 6000 / 48 = 125000
+ # Total rate per minute of runthread1
new_rate_thread1=125000
# terminals and rate for R2*
new_terminals_R21=2
@@ -121,11 +121,9 @@ If you encounter issues during the process, refer to the following troubleshooti
new_terminals_R24=2
new_terminals_R25=2
# Total number of requests per minute
- # R21, R22, R23 = 10 * 6000 / 60 = 1000
new_rate_R21=1000
new_rate_R22=1000
new_rate_R23=1000
- # R24, R25 = 6000 / 6 / 60 = 16
new_rate_R24=16
new_rate_R25=16
###########################################################
@@ -134,7 +132,7 @@ If you encounter issues during the process, refer to the following troubleshooti
- Usage:
```bash
- cd script
+ cd [Web3Bench.dir]/script
./config.sh
```
@@ -143,12 +141,9 @@ If you encounter issues during the process, refer to the following troubleshooti
- config/*
- This directory contains various configuration files used for testing on the VM. Each configuration file is designed to facilitate specific testing scenarios and workloads.
- `loaddata.xml`: the configuration file for loading data into the database
- - `runthread1.xml`: the configuration file for running point query workloads (R1, W1* and W4) at a rate of 7,500,000 requests per minute.
- - Total number of requests in one hour for R1 = 6,000,000
- - The weight of R1:W11:W12:W13:W14:W4 = 80%:4%:4%:4%:4%:4%
- - The weight of R1 is 80%, so the total number of requests in one hour for R1, W1* and W4 = 6,000,000/80% = 7,500,000
- - The total rate per minute of thread1 = 7,500,000/60 = 125,000
- - `runthread2.xml`: the configuration file for running complex query workloads once in serial covering R3*, W2, W3, W5* and W6.
+ - `runthread1.xml`: the configuration file for running point query workloads (R1, W1*, W4 and W6) at a rate of 125,000 requests per minute.
+ - The weight of R1:W11:W12:W13:W14:W4:W6 = 80%:4%:4%:4%:4%:2%:2%
+ - `runthread2.xml`: the configuration file for running complex query workloads once in serial covering R3*, W2, W3, W51 and W52.
- `runR21.xml`: the configuration file for running R21 at a rate of 1,000 request per minute.
- `runR22.xml`: the configuration file for running R22 at a rate of 1,000 request per minute.
- `runR23.xml`: the configuration file for running R23 at a rate of 1,000 request per minute.
@@ -164,12 +159,12 @@ When running a multi-phase experiment with varying a workload, it is imperative
> Note: weights have to sum up to 100%. The transactions are listed in the benchmark specific section labeled "transactiontypes". The order in which the transactions are declared is the same as their respective weights.
-- **DBUrl**: the URL to access the database
-- **username**: the username to access the database
-- **password**: the password to access the database
+- **DBUrl**: the URL to access the database.
+- **username**: the username to access the database.
+- **password**: the password to access the database.
- **scalefactor**: the scale factor for loading data. When saclefactor = 1, the data size is around 80MB.
- **time**: the duration of the workload in minutes
-- **rate**: the sending rate of the workload in transactions per minute
+- **rate**: the sending rate of the workload in transactions per minute.
- **weights**: the weights of the transactions in the workload. The sum of the weights should be 100.
- **transactiontypes**: the list of transactions in the workload. The order of the transactions should be the same as the order of the weights.
@@ -187,14 +182,14 @@ When running a multi-phase experiment with varying a workload, it is imperative
main
- 6000
+ 320
-
+
1000100REGULAR
@@ -267,16 +262,16 @@ usage: olxpbenchmark
```
- **-b,--bench**: the benchmark class. Currently, only web3benchmark is supported.
-- **--create=true**: create the database schema by excuting the SQL script in ddl files(e.g., src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-mysql-ddl.sql)
-- **--load=true**: load data into the database
-- **--execute=true**: run the workload
+- **--create=true**: create the database schema by excuting the SQL script in ddl files(e.g., src/main/resources/benchmarks/web3bench/web3bench-mysql-ddl.sql).
+- **--load=true**: load data into the database.
+- **--execute=true**: run the workload.
## Results
### Output Directory
- results/*
- - The result files for the benchmark
+ - The result files for the benchmark.
### Parsing results
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 3195a1e..0000000
--- a/build.xml
+++ /dev/null
@@ -1,81 +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/config/loaddata.xml b/config/loaddata.xml
index 1255a22..8b43d44 100644
--- a/config/loaddata.xml
+++ b/config/loaddata.xml
@@ -11,5 +11,5 @@
main
- 6000
+ 3
diff --git a/config/runR21.xml b/config/runR21.xml
index b83a029..261d314 100644
--- a/config/runR21.xml
+++ b/config/runR21.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 320
-
+
1000100REGULAR
diff --git a/config/runR22.xml b/config/runR22.xml
index 5b77ed7..766e292 100644
--- a/config/runR22.xml
+++ b/config/runR22.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 320
-
+
1000100REGULAR
diff --git a/config/runR23.xml b/config/runR23.xml
index 9bf1661..0bb5dc0 100644
--- a/config/runR23.xml
+++ b/config/runR23.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 320
-
+
1000100REGULAR
diff --git a/config/runR24.xml b/config/runR24.xml
index dda516b..22cf43d 100644
--- a/config/runR24.xml
+++ b/config/runR24.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 320
-
+
16100REGULAR
diff --git a/config/runR25.xml b/config/runR25.xml
index eda60ef..80d47b8 100644
--- a/config/runR25.xml
+++ b/config/runR25.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 320
-
+
16100REGULAR
diff --git a/config/runthread1.xml b/config/runthread1.xml
index 952b972..d20a223 100644
--- a/config/runthread1.xml
+++ b/config/runthread1.xml
@@ -11,14 +11,14 @@
main
- 6000
+ 3300
-
+
12500080,4,4,4,4,2,2REGULAR
diff --git a/config/runthread2.xml b/config/runthread2.xml
index 594778b..0541eb4 100644
--- a/config/runthread2.xml
+++ b/config/runthread2.xml
@@ -11,7 +11,7 @@
main
- 6000
+ 31
diff --git a/ivy.xml b/ivy.xml
deleted file mode 100644
index f5aa951..0000000
--- a/ivy.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ivysettings.xml b/ivysettings.xml
deleted file mode 100644
index 48f8c4e..0000000
--- a/ivysettings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/lib/.gitignore b/lib/.gitignore
deleted file mode 100644
index d392f0e..0000000
--- a/lib/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.jar
diff --git a/lib/README b/lib/README
deleted file mode 100644
index d54ce67..0000000
--- a/lib/README
+++ /dev/null
@@ -1,5 +0,0 @@
-# Dependencies
-
-Use `ant resolve` to automatically download all of the dependencies.
-
-You can then put any DBMS-specific jar files in this directory as needed.
diff --git a/olxpbenchmark b/olxpbenchmark
index 05cdabd..e7815b7 100755
--- a/olxpbenchmark
+++ b/olxpbenchmark
@@ -1,2 +1,2 @@
#!/bin/bash
-java -Xmx60G -cp `./classpath.sh bin` -Dlog4j.configuration=log4j.properties com.olxpbenchmark.DBWorkload $@
+java -jar target/olxpbenchmark-2.0-jar-with-dependencies.jar $@
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..56e09d7
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,141 @@
+
+ 4.0.0
+
+ com.olxpbenchmark
+ olxpbenchmark
+ 2.0
+ jar
+
+
+ UTF-8
+ UTF-8
+ 8
+ 8
+ 8
+
+
+
+
+
+ maven-assembly-plugin
+
+
+ package
+
+ single
+
+
+
+
+
+ jar-with-dependencies
+
+
+
+ com.olxpbenchmark.DBWorkload
+
+
+
+
+
+
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+ org.xerial
+ sqlite-jdbc
+ 3.41.2.2
+
+
+ org.postgresql
+ postgresql
+ 42.7.2
+
+
+ com.mysql
+ mysql-connector-j
+ 8.3.0
+
+
+ org.hsqldb
+ hsqldb
+ 2.7.2
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.12
+
+
+
+ org.slf4j
+ slf4j-reload4j
+ 2.0.12
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.14
+
+
+ org.apache.httpcomponents
+ httpmime
+ 4.5.14
+
+
+ commons-cli
+ commons-cli
+ 1.6.0
+
+
+ commons-jxpath
+ commons-jxpath
+ 1.3
+
+
+ commons-io
+ commons-io
+ 2.15.1
+
+
+ org.apache.commons
+ commons-configuration2
+ 2.9.0
+
+
+ org.apache.commons
+ commons-collections4
+ 4.4
+
+
+ org.apache.commons
+ commons-lang3
+ 3.14.0
+
+
+ com.opencsv
+ opencsv
+ 5.9
+
+
+ ch.ethz.ganymed
+ ganymed-ssh2
+ 261
+
+
+ javax.xml.bind
+ jaxb-api
+ 2.3.0
+
+
+
diff --git a/script/build.sh b/script/build.sh
index 232c341..919318b 100755
--- a/script/build.sh
+++ b/script/build.sh
@@ -3,11 +3,4 @@
# Navigate to the project directory
cd ..
-# Bootstrap the project using Ant
-ant bootstrap
-# Resolve the dependencies
-ant resolve
-# Clean the project
-ant clean
-# Build the project
-ant build
+mvn clean package
diff --git a/script/config.sh b/script/config.sh
index 98c1220..d7841ec 100755
--- a/script/config.sh
+++ b/script/config.sh
@@ -14,13 +14,12 @@ new_dburl="jdbc:mysql://$new_ip:$new_port/$new_dbname?useSSL=false\&characte
new_username=root
new_password=
new_nodeid="main"
-new_scalefactor=6000
+new_scalefactor=3
# Test time in minutes
-new_time=60
-# terminals and rate for runthread1: R1, W1* and W4
+new_time=5
+# terminals and rate for runthread1: R1, W1*, W4 and W6
new_terminals_thread1=30
-# Total number of requests in one hour for R1 = 1000 * 6000 = 6000000
-# then total rate per minute of thread1 = 1000 * 6000 / 80% / 60 = 1000 * 6000 / 48 = 125000
+# Total rate per minute of runthread1
new_rate_thread1=125000
# terminals and rate for R2*
new_terminals_R21=2
@@ -29,11 +28,9 @@ new_terminals_R23=2
new_terminals_R24=2
new_terminals_R25=2
# Total number of requests per minute
-# R21, R22, R23 = 10 * 6000 / 60 = 1000
new_rate_R21=1000
new_rate_R22=1000
new_rate_R23=1000
-# R24, R25 = 6000 / 6 / 60 = 16
new_rate_R24=16
new_rate_R25=16
###########################################################
diff --git a/script/runbench.sh b/script/runbench.sh
index 14a0341..abf976c 100755
--- a/script/runbench.sh
+++ b/script/runbench.sh
@@ -16,12 +16,13 @@ else
fi
# Modify log4j.properties based on dump_dml value
+log4j_properties="../src/main/resources/log4j.properties"
case $dump_dml in
INFO)
- sed $SED_INPLACE_OPTION 's/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=.*/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=INFO, A2/' ../log4j.properties
+ sed $SED_INPLACE_OPTION 's/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=.*/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=INFO, A2/' $log4j_properties
;;
TRACE)
- sed $SED_INPLACE_OPTION 's/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=.*/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=TRACE, A2/' ../log4j.properties
+ sed $SED_INPLACE_OPTION 's/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=.*/log4j.logger.com.olxpbenchmark.benchmarks.web3benchmark.procedures=TRACE, A2/' $log4j_properties
;;
*)
echo "Unknown dump_dml value: $dump_dml"
diff --git a/src/com/olxpbenchmark/BenchmarkState.java b/src/main/java/com/olxpbenchmark/BenchmarkState.java
similarity index 96%
rename from src/com/olxpbenchmark/BenchmarkState.java
rename to src/main/java/com/olxpbenchmark/BenchmarkState.java
index b22b0a3..42fff8e 100644
--- a/src/com/olxpbenchmark/BenchmarkState.java
+++ b/src/main/java/com/olxpbenchmark/BenchmarkState.java
@@ -38,13 +38,14 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.types.State;
public final class BenchmarkState {
- private static final Logger LOG = Logger.getLogger(BenchmarkState.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BenchmarkState.class);
private volatile State state = State.WARMUP;
diff --git a/src/com/olxpbenchmark/DBWorkload.java b/src/main/java/com/olxpbenchmark/DBWorkload.java
similarity index 90%
rename from src/com/olxpbenchmark/DBWorkload.java
rename to src/main/java/com/olxpbenchmark/DBWorkload.java
index 8ee0265..ddace59 100755
--- a/src/com/olxpbenchmark/DBWorkload.java
+++ b/src/main/java/com/olxpbenchmark/DBWorkload.java
@@ -56,8 +56,8 @@
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
@@ -65,16 +65,21 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.collections15.map.ListOrderedMap;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.SubnodeConfiguration;
-import org.apache.commons.configuration.XMLConfiguration;
-import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
-import org.apache.log4j.Logger;
+import org.apache.commons.collections4.map.ListOrderedMap;
+import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder;
+import org.apache.commons.configuration2.builder.fluent.Parameters;
+import org.apache.commons.configuration2.convert.DisabledListDelimiterHandler;
+import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.commons.configuration2.HierarchicalConfiguration;
+import org.apache.commons.configuration2.XMLConfiguration;
+import org.apache.commons.configuration2.tree.ImmutableNode;
+import org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
import com.olxpbenchmark.api.BenchmarkModule;
import com.olxpbenchmark.api.TransactionType;
@@ -92,7 +97,7 @@
import com.olxpbenchmark.util.JSONSerializable;
public class DBWorkload {
- private static final Logger LOG = Logger.getLogger(DBWorkload.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DBWorkload.class);
private static final String SINGLE_LINE = StringUtil.repeat("=", 70);
@@ -104,28 +109,11 @@ public class DBWorkload {
* @throws Exception
*/
public static void main(String[] args) throws Exception {
- // Initialize log4j
- String log4jPath = System.getProperty("log4j.configuration");
- if (log4jPath != null) {
- org.apache.log4j.PropertyConfigurator.configure(log4jPath);
- } else {
- throw new RuntimeException("Missing log4j.properties file");
- }
-
- if (ClassUtil.isAssertsEnabled()) {
- LOG.warn("\n" + getAssertWarning());
- }
// create the command line parser
- CommandLineParser parser = new PosixParser();
- XMLConfiguration pluginConfig = null;
- try {
- pluginConfig = new XMLConfiguration("config/plugin.xml");
- } catch (ConfigurationException e1) {
- LOG.info("Plugin configuration file config/plugin.xml is missing");
- e1.printStackTrace();
- }
- pluginConfig.setExpressionEngine(new XPathExpressionEngine());
+ CommandLineParser parser = new DefaultParser();
+ XMLConfiguration pluginConfig = buildConfiguration("config/plugin.xml");
+
Options options = new Options();
options.addOption("b", "bench", true,
"[required] Benchmark class. Currently supported: " + pluginConfig.getList("/plugin//@name"));
@@ -165,7 +153,7 @@ public static void main(String[] args) throws Exception {
printUsage(options);
return;
} else if (argsLine.hasOption("b") == false) {
- LOG.fatal("Missing Benchmark Class to load");
+ LOG.error("Missing Benchmark Class to load");
printUsage(options);
return;
}
@@ -207,8 +195,7 @@ public static void main(String[] args) throws Exception {
List activeTXTypes = new ArrayList();
String configFile = argsLine.getOptionValue("c");
- XMLConfiguration xmlConfig = new XMLConfiguration(configFile);
- xmlConfig.setExpressionEngine(new XPathExpressionEngine());
+ XMLConfiguration xmlConfig = buildConfiguration(configFile);
// Load the configuration for each benchmark
int lastTxnId = 0;
@@ -365,21 +352,21 @@ public static void main(String[] args) throws Exception {
// Get the name for the grouping and make sure it's valid.
String groupingName = xmlConfig.getString(key + "/name").toLowerCase();
if (!groupingName.matches("^[a-z]\\w*$")) {
- LOG.fatal(String.format("Grouping name \"%s\" is invalid."
+ LOG.error(String.format("Grouping name \"%s\" is invalid."
+ " Must begin with a letter and contain only"
+ " alphanumeric characters.", groupingName));
System.exit(-1);
} else if (groupingName.equals("all")) {
- LOG.fatal("Grouping name \"all\" is reserved."
+ LOG.error("Grouping name \"all\" is reserved."
+ " Please pick a different name.");
System.exit(-1);
}
// Get the weights for this grouping and make sure that there
// is an appropriate number of them.
- List groupingWeights = xmlConfig.getList(key + "/weights");
+ List groupingWeights = Arrays.asList(xmlConfig.getString(key + "/weights").split("\\s*,\\s*"));
if (groupingWeights.size() != numTxnTypes) {
- LOG.fatal(String.format("Grouping \"%s\" has %d weights,"
+ LOG.error(String.format("Grouping \"%s\" has %d weights,"
+ " but there are %d transactions in this"
+ " benchmark.", groupingName,
groupingWeights.size(), numTxnTypes));
@@ -404,24 +391,18 @@ public static void main(String[] args) throws Exception {
int size = xmlConfig.configurationsAt("/works/work").size();
for (int i = 1; i < size + 1; i++) {
- SubnodeConfiguration work = xmlConfig.configurationAt("works/work[" + i + "]");
+ final HierarchicalConfiguration work = xmlConfig
+ .configurationAt("works/work[" + i + "]");
List weight_strings;
// use a workaround if there multiple workloads or single
// attributed workload
if (targetList.length > 1 || work.containsKey("weights[@bench]")) {
- String weightKey = work.getString("weights" + pluginTest).toLowerCase();
- if (groupings.containsKey(weightKey))
- weight_strings = groupings.get(weightKey);
- else
- weight_strings = getWeights(plugin, work);
+ weight_strings = Arrays.asList(work.getString("weights" + pluginTest).split("\\s*,\\s*"));
} else {
- String weightKey = work.getString("weights[not(@bench)]").toLowerCase();
- if (groupings.containsKey(weightKey))
- weight_strings = groupings.get(weightKey);
- else
- weight_strings = work.getList("weights[not(@bench)]");
+ weight_strings = Arrays.asList(work.getString("weights[not(@bench)]").split("\\s*,\\s*"));
}
+
int rate = 1;
boolean rateLimited = true;
boolean disabled = false;
@@ -439,18 +420,18 @@ public static void main(String[] args) throws Exception {
} else if (rate_string.equals(RATE_UNLIMITED)) {
rateLimited = false;
} else if (rate_string.isEmpty()) {
- LOG.fatal(String.format("Please specify the rate for phase %d and workload %s", i, plugin));
+ LOG.error(String.format("Please specify the rate for phase %d and workload %s", i, plugin));
System.exit(-1);
} else {
try {
rate = Integer.parseInt(rate_string);
if (rate < 1) {
- LOG.fatal("Rate limit must be at least 1. Use unlimited or disabled values instead.");
+ LOG.error("Rate limit must be at least 1. Use unlimited or disabled values instead.");
System.exit(-1);
}
wrkld.setRate(rate);
} catch (NumberFormatException e) {
- LOG.fatal(String.format("Rate string must be '%s', '%s' or a number", RATE_DISABLED,
+ LOG.error(String.format("Rate string must be '%s', '%s' or a number", RATE_DISABLED,
RATE_UNLIMITED));
System.exit(-1);
}
@@ -472,7 +453,7 @@ public static void main(String[] args) throws Exception {
} else if (serial_string.equals("false")) {
serial = false;
} else {
- LOG.fatal(String.format("Invalid string for serial: '%s'. Serial string must be 'true' or 'false'",
+ LOG.error(String.format("Invalid string for serial: '%s'. Serial string must be 'true' or 'false'",
serial_string));
System.exit(-1);
}
@@ -507,7 +488,7 @@ public static void main(String[] args) throws Exception {
LOG.info("Timer disabled for serial run; will execute"
+ " all queries exactly once.");
} else {
- LOG.fatal("Must provide positive time bound for"
+ LOG.error("Must provide positive time bound for"
+ " non-serial executions. Either provide"
+ " a valid time or enable serial mode.");
System.exit(-1);
@@ -516,7 +497,7 @@ public static void main(String[] args) throws Exception {
LOG.info("Timer enabled for serial run; will run queries"
+ " serially in a loop until the timer expires.");
if (warmup < 0) {
- LOG.fatal("Must provide nonnegative time bound for"
+ LOG.error("Must provide nonnegative time bound for"
+ " warmup.");
System.exit(-1);
}
@@ -538,11 +519,11 @@ public static void main(String[] args) throws Exception {
for (Phase p : wrkld.getAllPhases()) {
j++;
if (p.getWeightCount() != wrkld.getNumTxnTypes()) {
- LOG.fatal(String.format(
+ LOG.error(String.format(
"Configuration files is inconsistent, phase %d contains %d weights but you defined %d transaction types",
j, p.getWeightCount(), wrkld.getNumTxnTypes()));
if (p.isSerial()) {
- LOG.fatal(
+ LOG.error(
"However, note that since this a serial phase, the weights are irrelevant (but still must be included---sorry).");
}
System.exit(-1);
@@ -646,6 +627,19 @@ public static void main(String[] args) throws Exception {
}
}
+ public static XMLConfiguration buildConfiguration(String filename) throws ConfigurationException {
+ Parameters params = new Parameters();
+ FileBasedConfigurationBuilder builder = new FileBasedConfigurationBuilder<>(
+ XMLConfiguration.class)
+ .configure(
+ params
+ .xml()
+ .setFileName(filename)
+ .setListDelimiterHandler(new DisabledListDelimiterHandler())
+ .setExpressionEngine(new XPathExpressionEngine()));
+ return builder.getConfiguration();
+ }
+
private static String writeHistograms(Results r) {
StringBuilder sb = new StringBuilder();
@@ -847,38 +841,6 @@ private static void writeOutputs(Results r, List activeTXTypes,
rs.close();
}
- /*
- * buggy piece of shit of Java XPath implementation made me do it
- * replaces good old [@bench="{plugin_name}", which doesn't work in Java XPath
- * with lists
- */
- private static List getWeights(String plugin, SubnodeConfiguration work) {
-
- List weight_strings = new LinkedList();
- @SuppressWarnings("unchecked")
- List weights = work.configurationsAt("weights");
- boolean weights_started = false;
-
- for (SubnodeConfiguration weight : weights) {
-
- // stop if second attributed node encountered
- if (weights_started && weight.getRootNode().getAttributeCount() > 0) {
- break;
- }
- // start adding node values, if node with attribute equal to current
- // plugin encountered
- if (weight.getRootNode().getAttributeCount() > 0
- && weight.getRootNode().getAttribute(0).getValue().equals(plugin)) {
- weights_started = true;
- }
- if (weights_started) {
- weight_strings.add(weight.getString(""));
- }
-
- }
- return weight_strings;
- }
-
private static void runScript(BenchmarkModule bench, String script) {
LOG.debug(String.format("Running %s", script));
bench.runScript(script);
diff --git a/src/com/olxpbenchmark/DistributionStatistics.java b/src/main/java/com/olxpbenchmark/DistributionStatistics.java
similarity index 97%
rename from src/com/olxpbenchmark/DistributionStatistics.java
rename to src/main/java/com/olxpbenchmark/DistributionStatistics.java
index a11d2df..a45ecb8 100644
--- a/src/com/olxpbenchmark/DistributionStatistics.java
+++ b/src/main/java/com/olxpbenchmark/DistributionStatistics.java
@@ -39,10 +39,11 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DistributionStatistics {
- private static final Logger LOG = Logger.getLogger(DistributionStatistics.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DistributionStatistics.class);
private static final double[] PERCENTILES = { 0.0, 0.25, 0.5, 0.75, 0.9,
0.95, 0.99, 0.999, 0.9999, 1.0 };
diff --git a/src/com/olxpbenchmark/LatencyRecord.java b/src/main/java/com/olxpbenchmark/LatencyRecord.java
similarity index 100%
rename from src/com/olxpbenchmark/LatencyRecord.java
rename to src/main/java/com/olxpbenchmark/LatencyRecord.java
diff --git a/src/com/olxpbenchmark/LoadLineReader.java b/src/main/java/com/olxpbenchmark/LoadLineReader.java
similarity index 100%
rename from src/com/olxpbenchmark/LoadLineReader.java
rename to src/main/java/com/olxpbenchmark/LoadLineReader.java
diff --git a/src/com/olxpbenchmark/Phase.java b/src/main/java/com/olxpbenchmark/Phase.java
similarity index 98%
rename from src/com/olxpbenchmark/Phase.java
rename to src/main/java/com/olxpbenchmark/Phase.java
index 454f9a6..4eeff8f 100644
--- a/src/com/olxpbenchmark/Phase.java
+++ b/src/main/java/com/olxpbenchmark/Phase.java
@@ -21,12 +21,13 @@
import java.util.List;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.util.StringUtil;
public class Phase {
- private static final Logger LOG = Logger.getLogger(Phase.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Phase.class);
public enum Arrival {
REGULAR, POISSON,
diff --git a/src/com/olxpbenchmark/Results.java b/src/main/java/com/olxpbenchmark/Results.java
similarity index 100%
rename from src/com/olxpbenchmark/Results.java
rename to src/main/java/com/olxpbenchmark/Results.java
diff --git a/src/com/olxpbenchmark/SubmittedProcedure.java b/src/main/java/com/olxpbenchmark/SubmittedProcedure.java
similarity index 97%
rename from src/com/olxpbenchmark/SubmittedProcedure.java
rename to src/main/java/com/olxpbenchmark/SubmittedProcedure.java
index 070b082..589d4f9 100644
--- a/src/com/olxpbenchmark/SubmittedProcedure.java
+++ b/src/main/java/com/olxpbenchmark/SubmittedProcedure.java
@@ -23,7 +23,8 @@
import com.olxpbenchmark.types.State;
import com.olxpbenchmark.util.QueueLimitException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This class is used for keeping track of the procedures that have been
diff --git a/src/com/olxpbenchmark/ThreadBench.java b/src/main/java/com/olxpbenchmark/ThreadBench.java
similarity index 99%
rename from src/com/olxpbenchmark/ThreadBench.java
rename to src/main/java/com/olxpbenchmark/ThreadBench.java
index 4fb1f2c..19e9f91 100755
--- a/src/com/olxpbenchmark/ThreadBench.java
+++ b/src/main/java/com/olxpbenchmark/ThreadBench.java
@@ -46,8 +46,9 @@
import java.util.NoSuchElementException;
import java.util.Set;
-import org.apache.commons.collections15.map.ListOrderedMap;
-import org.apache.log4j.Logger;
+import org.apache.commons.collections4.map.ListOrderedMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.LatencyRecord.Sample;
import com.olxpbenchmark.api.BenchmarkModule;
@@ -59,7 +60,7 @@
import com.olxpbenchmark.util.StringUtil;
public class ThreadBench implements Thread.UncaughtExceptionHandler {
- private static final Logger LOG = Logger.getLogger(ThreadBench.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ThreadBench.class);
private static BenchmarkState testState;
private final List extends Worker extends BenchmarkModule>> workers;
diff --git a/src/com/olxpbenchmark/TraceReader.java b/src/main/java/com/olxpbenchmark/TraceReader.java
similarity index 98%
rename from src/com/olxpbenchmark/TraceReader.java
rename to src/main/java/com/olxpbenchmark/TraceReader.java
index 1cb472f..5e4bacb 100644
--- a/src/com/olxpbenchmark/TraceReader.java
+++ b/src/main/java/com/olxpbenchmark/TraceReader.java
@@ -23,7 +23,8 @@
import java.util.List;
import java.util.LinkedList;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This class reads in one of the tracefiles (.raw output from a previous
@@ -33,7 +34,7 @@
* @author breilly
*/
public class TraceReader {
- private static final Logger LOG = Logger.getLogger(TraceReader.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TraceReader.class);
// POD for tracking submitted/read procedures.
private class TraceElement {
diff --git a/src/com/olxpbenchmark/WorkloadConfiguration.java b/src/main/java/com/olxpbenchmark/WorkloadConfiguration.java
similarity index 98%
rename from src/com/olxpbenchmark/WorkloadConfiguration.java
rename to src/main/java/com/olxpbenchmark/WorkloadConfiguration.java
index 92c00d1..1cba52f 100755
--- a/src/com/olxpbenchmark/WorkloadConfiguration.java
+++ b/src/main/java/com/olxpbenchmark/WorkloadConfiguration.java
@@ -59,8 +59,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.collections15.map.ListOrderedMap;
-import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.commons.collections4.map.ListOrderedMap;
+import org.apache.commons.configuration2.XMLConfiguration;
import com.olxpbenchmark.api.TransactionTypes;
import com.olxpbenchmark.types.DatabaseType;
diff --git a/src/com/olxpbenchmark/WorkloadState.java b/src/main/java/com/olxpbenchmark/WorkloadState.java
similarity index 98%
rename from src/com/olxpbenchmark/WorkloadState.java
rename to src/main/java/com/olxpbenchmark/WorkloadState.java
index e2ed988..2927b73 100644
--- a/src/com/olxpbenchmark/WorkloadState.java
+++ b/src/main/java/com/olxpbenchmark/WorkloadState.java
@@ -23,7 +23,8 @@
import com.olxpbenchmark.types.State;
import com.olxpbenchmark.util.QueueLimitException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This class is used to share a state among the workers of a single
@@ -35,7 +36,7 @@
*/
public class WorkloadState {
private static final int RATE_QUEUE_LIMIT = 10000;
- private static final Logger LOG = Logger.getLogger(ThreadBench.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ThreadBench.class);
private LinkedList workQueue = new LinkedList();
private BenchmarkState benchmarkState;
diff --git a/src/com/olxpbenchmark/api/BenchmarkModule.java b/src/main/java/com/olxpbenchmark/api/BenchmarkModule.java
similarity index 96%
rename from src/com/olxpbenchmark/api/BenchmarkModule.java
rename to src/main/java/com/olxpbenchmark/api/BenchmarkModule.java
index a813252..8054270 100755
--- a/src/com/olxpbenchmark/api/BenchmarkModule.java
+++ b/src/main/java/com/olxpbenchmark/api/BenchmarkModule.java
@@ -66,7 +66,8 @@
import java.util.Random;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.WorkloadConfiguration;
import com.olxpbenchmark.api.Loader.LoaderThread;
@@ -81,19 +82,7 @@
* Base class for all benchmark implementations
*/
public abstract class BenchmarkModule {
- private static final Logger LOG = Logger.getLogger(BenchmarkModule.class);
-
- /**
- * Each benchmark must put their all of the DBMS-specific DDLs
- * in this directory.
- */
- public static final String DDLS_DIR = "ddls";
-
- /**
- * Each dialect xml file must put their all of the DBMS-specific DIALECTs
- * in this directory.
- */
- public static final String DIALECTS_DIR = "dialects";
+ private static final Logger LOG = LoggerFactory.getLogger(BenchmarkModule.class);
/**
* The identifier for this benchmark
@@ -217,7 +206,10 @@ public URL getDatabaseDDL(DatabaseType db_type) {
for (String ddlName : ddlNames) {
if (ddlName == null)
continue;
- URL ddlURL = this.getClass().getResource(DDLS_DIR + File.separator + ddlName);
+
+ URL ddlURL = this.getClass().getResource("/benchmarks/" + this.benchmarkName + "/" + ddlName);
+ LOG.debug(this.benchmarkName + " " + ddlName + " " + ddlURL);
+
if (ddlURL != null) {
if (LOG.isDebugEnabled())
LOG.debug("Found DDL file for " + db_type + ": " + ddlURL);
@@ -255,7 +247,7 @@ public File getSQLDialect(DatabaseType db_type) {
this.benchmarkName + "-dialects.xml",
};
for (String xmlName : xmlNames) {
- URL ddlURL = this.getClass().getResource(DIALECTS_DIR + File.separator + xmlName);
+ URL ddlURL = this.getClass().getResource("/benchmarks/" + this.benchmarkName + "/" + xmlName);
if (ddlURL != null) {
try {
return new File(ddlURL.toURI().getPath());
diff --git a/src/com/olxpbenchmark/api/CreateDialects.java b/src/main/java/com/olxpbenchmark/api/CreateDialects.java
similarity index 97%
rename from src/com/olxpbenchmark/api/CreateDialects.java
rename to src/main/java/com/olxpbenchmark/api/CreateDialects.java
index 7e636f3..3f7dc69 100644
--- a/src/com/olxpbenchmark/api/CreateDialects.java
+++ b/src/main/java/com/olxpbenchmark/api/CreateDialects.java
@@ -19,7 +19,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.catalog.Catalog;
import com.olxpbenchmark.catalog.Column;
@@ -33,7 +34,7 @@
* @author pavlo
*/
public class CreateDialects {
- private static final Logger LOG = Logger.getLogger(CreateDialects.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CreateDialects.class);
protected static final String DB_CONNECTION = "jdbc:sqlite:";
private static final String SPACER = " ";
diff --git a/src/com/olxpbenchmark/api/Loader.java b/src/main/java/com/olxpbenchmark/api/Loader.java
similarity index 98%
rename from src/com/olxpbenchmark/api/Loader.java
rename to src/main/java/com/olxpbenchmark/api/Loader.java
index a6748f9..1a50398 100755
--- a/src/com/olxpbenchmark/api/Loader.java
+++ b/src/main/java/com/olxpbenchmark/api/Loader.java
@@ -41,7 +41,8 @@
import java.util.List;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.WorkloadConfiguration;
import com.olxpbenchmark.catalog.Catalog;
@@ -55,7 +56,7 @@
* @author pavlo
*/
public abstract class Loader {
- private static final Logger LOG = Logger.getLogger(Loader.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Loader.class);
protected final T benchmark;
protected final WorkloadConfiguration workConf;
diff --git a/src/com/olxpbenchmark/api/LoaderUtil.java b/src/main/java/com/olxpbenchmark/api/LoaderUtil.java
similarity index 100%
rename from src/com/olxpbenchmark/api/LoaderUtil.java
rename to src/main/java/com/olxpbenchmark/api/LoaderUtil.java
diff --git a/src/com/olxpbenchmark/api/Operation.java b/src/main/java/com/olxpbenchmark/api/Operation.java
similarity index 100%
rename from src/com/olxpbenchmark/api/Operation.java
rename to src/main/java/com/olxpbenchmark/api/Operation.java
diff --git a/src/com/olxpbenchmark/api/Procedure.java b/src/main/java/com/olxpbenchmark/api/Procedure.java
similarity index 98%
rename from src/com/olxpbenchmark/api/Procedure.java
rename to src/main/java/com/olxpbenchmark/api/Procedure.java
index 67516c4..69a0155 100644
--- a/src/com/olxpbenchmark/api/Procedure.java
+++ b/src/main/java/com/olxpbenchmark/api/Procedure.java
@@ -27,13 +27,14 @@
import java.util.Map;
import java.util.Map.Entry;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.jdbc.AutoIncrementPreparedStatement;
import com.olxpbenchmark.types.DatabaseType;
public abstract class Procedure {
- private static final Logger LOG = Logger.getLogger(Procedure.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Procedure.class);
protected static final String SQL_EXPLAIN_ANALYZE = "EXPLAIN ANALYZE ";
diff --git a/src/com/olxpbenchmark/api/SQLStmt.java b/src/main/java/com/olxpbenchmark/api/SQLStmt.java
similarity index 95%
rename from src/com/olxpbenchmark/api/SQLStmt.java
rename to src/main/java/com/olxpbenchmark/api/SQLStmt.java
index f00cf51..a933c00 100644
--- a/src/com/olxpbenchmark/api/SQLStmt.java
+++ b/src/main/java/com/olxpbenchmark/api/SQLStmt.java
@@ -19,7 +19,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Wrapper Class for SQL Statements
@@ -27,7 +28,7 @@
* @author pavlo
*/
public final class SQLStmt {
- private static final Logger LOG = Logger.getLogger(SQLStmt.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SQLStmt.class);
private static final Pattern SUBSTITUTION_PATTERN = Pattern.compile("\\?\\?");
diff --git a/src/com/olxpbenchmark/api/StatementDialects.java b/src/main/java/com/olxpbenchmark/api/StatementDialects.java
similarity index 98%
rename from src/com/olxpbenchmark/api/StatementDialects.java
rename to src/main/java/com/olxpbenchmark/api/StatementDialects.java
index a6f9678..e7fe076 100644
--- a/src/com/olxpbenchmark/api/StatementDialects.java
+++ b/src/main/java/com/olxpbenchmark/api/StatementDialects.java
@@ -36,7 +36,8 @@
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;
import com.olxpbenchmark.api.dialects.DialectType;
@@ -51,7 +52,7 @@
* @author pavlo
*/
public class StatementDialects {
- private static final Logger LOG = Logger.getLogger(StatementDialects.class);
+ private static final Logger LOG = LoggerFactory.getLogger(StatementDialects.class);
private static final DatabaseType DEFAULT_DB_TYPE = DatabaseType.MYSQL;
diff --git a/src/com/olxpbenchmark/api/TransactionGenerator.java b/src/main/java/com/olxpbenchmark/api/TransactionGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/api/TransactionGenerator.java
rename to src/main/java/com/olxpbenchmark/api/TransactionGenerator.java
diff --git a/src/com/olxpbenchmark/api/TransactionType.java b/src/main/java/com/olxpbenchmark/api/TransactionType.java
similarity index 100%
rename from src/com/olxpbenchmark/api/TransactionType.java
rename to src/main/java/com/olxpbenchmark/api/TransactionType.java
diff --git a/src/com/olxpbenchmark/api/TransactionTypes.java b/src/main/java/com/olxpbenchmark/api/TransactionTypes.java
similarity index 98%
rename from src/com/olxpbenchmark/api/TransactionTypes.java
rename to src/main/java/com/olxpbenchmark/api/TransactionTypes.java
index 6cd251c..c240e21 100644
--- a/src/com/olxpbenchmark/api/TransactionTypes.java
+++ b/src/main/java/com/olxpbenchmark/api/TransactionTypes.java
@@ -22,7 +22,7 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.collections15.map.ListOrderedMap;
+import org.apache.commons.collections4.map.ListOrderedMap;
public class TransactionTypes implements Collection {
diff --git a/src/com/olxpbenchmark/api/Worker.java b/src/main/java/com/olxpbenchmark/api/Worker.java
similarity index 99%
rename from src/com/olxpbenchmark/api/Worker.java
rename to src/main/java/com/olxpbenchmark/api/Worker.java
index a2c02e6..8c62941 100755
--- a/src/com/olxpbenchmark/api/Worker.java
+++ b/src/main/java/com/olxpbenchmark/api/Worker.java
@@ -62,7 +62,8 @@
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.LatencyRecord;
import com.olxpbenchmark.Phase;
@@ -78,7 +79,7 @@
import com.olxpbenchmark.util.StringUtil;
public abstract class Worker implements Runnable {
- private static final Logger LOG = Logger.getLogger(Worker.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Worker.class);
private WorkloadState wrkldState;
private LatencyRecord latencies;
diff --git a/src/com/olxpbenchmark/api/collectors/DBCollector.java b/src/main/java/com/olxpbenchmark/api/collectors/DBCollector.java
similarity index 97%
rename from src/com/olxpbenchmark/api/collectors/DBCollector.java
rename to src/main/java/com/olxpbenchmark/api/collectors/DBCollector.java
index f997b89..56fe9b3 100644
--- a/src/com/olxpbenchmark/api/collectors/DBCollector.java
+++ b/src/main/java/com/olxpbenchmark/api/collectors/DBCollector.java
@@ -30,7 +30,8 @@
import java.util.Map;
import java.util.TreeMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.WorkloadConfiguration;
import com.olxpbenchmark.catalog.Catalog;
@@ -39,7 +40,7 @@
public abstract class DBCollector {
- private static final Logger LOG = Logger.getLogger(DBCollector.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DBCollector.class);
protected static final String EMPTY_JSON = "{}";
diff --git a/src/com/olxpbenchmark/api/collectors/MyRocksCollector.java b/src/main/java/com/olxpbenchmark/api/collectors/MyRocksCollector.java
similarity index 97%
rename from src/com/olxpbenchmark/api/collectors/MyRocksCollector.java
rename to src/main/java/com/olxpbenchmark/api/collectors/MyRocksCollector.java
index 05dc8a1..a14d438 100644
--- a/src/com/olxpbenchmark/api/collectors/MyRocksCollector.java
+++ b/src/main/java/com/olxpbenchmark/api/collectors/MyRocksCollector.java
@@ -25,11 +25,12 @@
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MyRocksCollector extends DBCollector {
- private static final Logger LOG = Logger.getLogger(MyRocksCollector.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MyRocksCollector.class);
private static final String PARAMETERS_SQL = "SHOW GLOBAL VARIABLES";
diff --git a/src/com/olxpbenchmark/api/collectors/MySQLCollector.java b/src/main/java/com/olxpbenchmark/api/collectors/MySQLCollector.java
similarity index 94%
rename from src/com/olxpbenchmark/api/collectors/MySQLCollector.java
rename to src/main/java/com/olxpbenchmark/api/collectors/MySQLCollector.java
index cda26ac..2d43d1e 100644
--- a/src/com/olxpbenchmark/api/collectors/MySQLCollector.java
+++ b/src/main/java/com/olxpbenchmark/api/collectors/MySQLCollector.java
@@ -19,11 +19,12 @@
import java.sql.SQLException;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MySQLCollector extends DBCollector {
- private static final Logger LOG = Logger.getLogger(MySQLCollector.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MySQLCollector.class);
private static final String PARAMETERS_SQL = "SHOW GLOBAL VARIABLES";
diff --git a/src/com/olxpbenchmark/api/collectors/NoopCollector.java b/src/main/java/com/olxpbenchmark/api/collectors/NoopCollector.java
similarity index 100%
rename from src/com/olxpbenchmark/api/collectors/NoopCollector.java
rename to src/main/java/com/olxpbenchmark/api/collectors/NoopCollector.java
diff --git a/src/com/olxpbenchmark/api/collectors/PostgresCollector.java b/src/main/java/com/olxpbenchmark/api/collectors/PostgresCollector.java
similarity index 95%
rename from src/com/olxpbenchmark/api/collectors/PostgresCollector.java
rename to src/main/java/com/olxpbenchmark/api/collectors/PostgresCollector.java
index 50583a8..32bedd1 100644
--- a/src/com/olxpbenchmark/api/collectors/PostgresCollector.java
+++ b/src/main/java/com/olxpbenchmark/api/collectors/PostgresCollector.java
@@ -22,11 +22,12 @@
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class PostgresCollector extends DBCollector {
- private static final Logger LOG = Logger.getLogger(PostgresCollector.class);
+ private static final Logger LOG = LoggerFactory.getLogger(PostgresCollector.class);
private static final String PARAMETERS_SQL = "SHOW ALL";
diff --git a/src/com/olxpbenchmark/api/dialects.xsd b/src/main/java/com/olxpbenchmark/api/dialects.xsd
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects.xsd
rename to src/main/java/com/olxpbenchmark/api/dialects.xsd
diff --git a/src/com/olxpbenchmark/api/dialects/DialectType.java b/src/main/java/com/olxpbenchmark/api/dialects/DialectType.java
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects/DialectType.java
rename to src/main/java/com/olxpbenchmark/api/dialects/DialectType.java
diff --git a/src/com/olxpbenchmark/api/dialects/DialectsType.java b/src/main/java/com/olxpbenchmark/api/dialects/DialectsType.java
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects/DialectsType.java
rename to src/main/java/com/olxpbenchmark/api/dialects/DialectsType.java
diff --git a/src/com/olxpbenchmark/api/dialects/ObjectFactory.java b/src/main/java/com/olxpbenchmark/api/dialects/ObjectFactory.java
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects/ObjectFactory.java
rename to src/main/java/com/olxpbenchmark/api/dialects/ObjectFactory.java
diff --git a/src/com/olxpbenchmark/api/dialects/ProcedureType.java b/src/main/java/com/olxpbenchmark/api/dialects/ProcedureType.java
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects/ProcedureType.java
rename to src/main/java/com/olxpbenchmark/api/dialects/ProcedureType.java
diff --git a/src/com/olxpbenchmark/api/dialects/StatementType.java b/src/main/java/com/olxpbenchmark/api/dialects/StatementType.java
similarity index 100%
rename from src/com/olxpbenchmark/api/dialects/StatementType.java
rename to src/main/java/com/olxpbenchmark/api/dialects/StatementType.java
diff --git a/src/com/olxpbenchmark/benchmarks/README.md b/src/main/java/com/olxpbenchmark/benchmarks/README.md
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/README.md
rename to src/main/java/com/olxpbenchmark/benchmarks/README.md
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java
index 37add2a..a5c8abf 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Benchmark.java
@@ -45,7 +45,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.sql.SQLException;
@@ -55,7 +56,7 @@
import java.util.List;
public class WEB3Benchmark extends BenchmarkModule {
- private static final Logger LOG = Logger.getLogger(WEB3Benchmark.class);
+ private static final Logger LOG = LoggerFactory.getLogger(WEB3Benchmark.class);
public WEB3Benchmark(WorkloadConfiguration workConf) {
super("web3bench", workConf, true);
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Config.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Config.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Config.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Config.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Constants.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Constants.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Constants.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Constants.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java
similarity index 99%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java
index d6d60c0..2335c1e 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Loader.java
@@ -44,7 +44,8 @@
import com.olxpbenchmark.util.SQLUtil;
import com.olxpbenchmark.util.json.Test;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.*;
import java.util.ArrayList;
@@ -52,7 +53,7 @@
import java.util.concurrent.CountDownLatch;
public class WEB3Loader extends Loader {
- private static final Logger LOG = Logger.getLogger(WEB3Loader.class);
+ private static final Logger LOG = LoggerFactory.getLogger(WEB3Loader.class);
public WEB3Loader(WEB3Benchmark benchmark) {
super(benchmark);
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Util.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Util.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Util.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Util.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java
similarity index 97%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java
index 2e6d635..7bd615a 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/WEB3Worker.java
@@ -41,7 +41,8 @@
import com.olxpbenchmark.api.TransactionType;
import com.olxpbenchmark.api.Worker;
import com.olxpbenchmark.types.TransactionStatus;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.SQLException;
import java.util.Random;
@@ -52,7 +53,7 @@
public class WEB3Worker extends Worker {
- private static final Logger LOG = Logger.getLogger(WEB3Worker.class);
+ private static final Logger LOG = LoggerFactory.getLogger(WEB3Worker.class);
private final Random gen = new Random();
private static CounterGenerator startRecord;
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Blocks.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Blocks.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Blocks.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Blocks.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Contracts.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Contracts.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Contracts.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Contracts.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Token_transfers.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Token_transfers.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Token_transfers.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Token_transfers.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Transactions.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Transactions.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Transactions.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/pojo/Transactions.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java
index 108b4c1..0603220 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R1.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R1 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R1.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R1.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java
index 5693ae7..379fede 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R21.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R21 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R21.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R21.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java
index b47a1a9..f19fb75 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R22.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R22 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R22.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R22.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java
index 47f52c8..ab06039 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R23.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R23 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R23.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R23.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java
index b136469..edbdba5 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R24.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R24 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R24.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R24.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java
index 8a25707..32c31f2 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R25.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R25 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R25.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R25.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java
index 8d96ee8..5b48568 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R31.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R31 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R31.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R31.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java
similarity index 95%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java
index c0fafa3..25f5bb1 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R32.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R32 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R32.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R32.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java
similarity index 95%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java
index 2766960..4d9e1a2 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R33.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R33 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R33.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R33.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java
index 6adc8f9..66ab1f8 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R34.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R34 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R34.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R34.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java
index b0953a8..793aa7d 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/R35.java
@@ -25,7 +25,8 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
import com.olxpbenchmark.benchmarks.web3benchmark.procedures.WEB3Procedure;
import com.olxpbenchmark.distributions.ZipfianGenerator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -34,7 +35,7 @@
import java.util.Random;
public class R35 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(R35.class);
+ private static final Logger LOG = LoggerFactory.getLogger(R35.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java
similarity index 97%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java
index fc3dc05..c5c3854 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W11.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -32,7 +33,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W11 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W11.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W11.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java
index ff76b47..c33d66d 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W12.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -32,7 +33,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W12 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W12.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W12.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java
similarity index 97%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java
index 11764c6..89bd398 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W13.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -32,7 +33,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W13 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W13.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W13.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java
similarity index 97%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java
index a87d29c..8bda036 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W14.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -32,7 +33,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W14 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W14.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W14.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java
similarity index 98%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java
index b6bcb19..ac7b348 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W2.java
@@ -25,7 +25,8 @@
import java.util.Random;
import java.lang.String;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -33,7 +34,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W2 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W2.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W2.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java
similarity index 95%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java
index 8d86005..2ba41b8 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W3.java
@@ -24,14 +24,15 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Util;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W3 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W3.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W3.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java
index 7e19005..677a73b 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W4.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -35,7 +36,7 @@
import java.util.List;
public class W4 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W4.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W4.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java
similarity index 95%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java
index 7c99ad6..a13596a 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W51.java
@@ -24,14 +24,15 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Util;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W51 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W51.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W51.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java
similarity index 95%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java
index c7c27c2..f6710f8 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W52.java
@@ -24,14 +24,15 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Util;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W52 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W52.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W52.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java
similarity index 96%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java
index 6ff7687..17fba96 100755
--- a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java
+++ b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/W6.java
@@ -24,7 +24,8 @@
import java.sql.SQLException;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.api.SQLStmt;
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Config;
@@ -32,7 +33,7 @@
import com.olxpbenchmark.benchmarks.web3benchmark.WEB3Worker;
public class W6 extends WEB3Procedure {
- private static final Logger LOG = Logger.getLogger(W6.class);
+ private static final Logger LOG = LoggerFactory.getLogger(W6.class);
public String classname = this.getClass().getSimpleName();
public String classname_note = "/* " + classname + " */ ";
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/WEB3Procedure.java b/src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/WEB3Procedure.java
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/procedures/WEB3Procedure.java
rename to src/main/java/com/olxpbenchmark/benchmarks/web3benchmark/procedures/WEB3Procedure.java
diff --git a/src/com/olxpbenchmark/catalog/AbstractCatalogObject.java b/src/main/java/com/olxpbenchmark/catalog/AbstractCatalogObject.java
similarity index 100%
rename from src/com/olxpbenchmark/catalog/AbstractCatalogObject.java
rename to src/main/java/com/olxpbenchmark/catalog/AbstractCatalogObject.java
diff --git a/src/com/olxpbenchmark/catalog/Catalog.java b/src/main/java/com/olxpbenchmark/catalog/Catalog.java
similarity index 98%
rename from src/com/olxpbenchmark/catalog/Catalog.java
rename to src/main/java/com/olxpbenchmark/catalog/Catalog.java
index 38230cd..22cc4fc 100755
--- a/src/com/olxpbenchmark/catalog/Catalog.java
+++ b/src/main/java/com/olxpbenchmark/catalog/Catalog.java
@@ -35,6 +35,7 @@
package com.olxpbenchmark.catalog;
import java.io.IOException;
+import java.nio.charset.Charset;
import java.net.URL;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
@@ -51,7 +52,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.commons.io.IOUtils;
import com.olxpbenchmark.api.BenchmarkModule;
@@ -66,7 +68,7 @@
* @author pavlo
*/
public final class Catalog {
- private static final Logger LOG = Logger.getLogger(Catalog.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Catalog.class);
/**
* TODO
@@ -315,7 +317,7 @@ protected Map getOriginalTableNames() {
URL ddl = this.benchmark.getDatabaseDDL(DatabaseType.HSQLDB);
String ddlContents;
try {
- ddlContents = IOUtils.toString(ddl);
+ ddlContents = IOUtils.toString(ddl, Charset.defaultCharset());
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
diff --git a/src/com/olxpbenchmark/catalog/Column.java b/src/main/java/com/olxpbenchmark/catalog/Column.java
similarity index 100%
rename from src/com/olxpbenchmark/catalog/Column.java
rename to src/main/java/com/olxpbenchmark/catalog/Column.java
diff --git a/src/com/olxpbenchmark/catalog/Index.java b/src/main/java/com/olxpbenchmark/catalog/Index.java
similarity index 98%
rename from src/com/olxpbenchmark/catalog/Index.java
rename to src/main/java/com/olxpbenchmark/catalog/Index.java
index 27c9e97..0e881fb 100644
--- a/src/com/olxpbenchmark/catalog/Index.java
+++ b/src/main/java/com/olxpbenchmark/catalog/Index.java
@@ -23,7 +23,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
-import org.apache.commons.collections15.map.ListOrderedMap;
+import org.apache.commons.collections4.map.ListOrderedMap;
import com.olxpbenchmark.types.SortDirectionType;
import com.olxpbenchmark.util.StringUtil;
diff --git a/src/com/olxpbenchmark/catalog/IntegrityConstraint.java b/src/main/java/com/olxpbenchmark/catalog/IntegrityConstraint.java
similarity index 97%
rename from src/com/olxpbenchmark/catalog/IntegrityConstraint.java
rename to src/main/java/com/olxpbenchmark/catalog/IntegrityConstraint.java
index e063c88..d875918 100644
--- a/src/com/olxpbenchmark/catalog/IntegrityConstraint.java
+++ b/src/main/java/com/olxpbenchmark/catalog/IntegrityConstraint.java
@@ -18,7 +18,7 @@
import java.io.Serializable;
-import org.apache.commons.lang.NotImplementedException;
+import org.apache.commons.lang3.NotImplementedException;
/**
*
diff --git a/src/com/olxpbenchmark/catalog/IntegrityConstraintsExistsException.java b/src/main/java/com/olxpbenchmark/catalog/IntegrityConstraintsExistsException.java
similarity index 100%
rename from src/com/olxpbenchmark/catalog/IntegrityConstraintsExistsException.java
rename to src/main/java/com/olxpbenchmark/catalog/IntegrityConstraintsExistsException.java
diff --git a/src/com/olxpbenchmark/catalog/Table.java b/src/main/java/com/olxpbenchmark/catalog/Table.java
similarity index 100%
rename from src/com/olxpbenchmark/catalog/Table.java
rename to src/main/java/com/olxpbenchmark/catalog/Table.java
diff --git a/src/com/olxpbenchmark/distributions/CounterGenerator.java b/src/main/java/com/olxpbenchmark/distributions/CounterGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/CounterGenerator.java
rename to src/main/java/com/olxpbenchmark/distributions/CounterGenerator.java
diff --git a/src/com/olxpbenchmark/distributions/Generator.java b/src/main/java/com/olxpbenchmark/distributions/Generator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/Generator.java
rename to src/main/java/com/olxpbenchmark/distributions/Generator.java
diff --git a/src/com/olxpbenchmark/distributions/IntegerGenerator.java b/src/main/java/com/olxpbenchmark/distributions/IntegerGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/IntegerGenerator.java
rename to src/main/java/com/olxpbenchmark/distributions/IntegerGenerator.java
diff --git a/src/com/olxpbenchmark/distributions/PoissonGenerator.java b/src/main/java/com/olxpbenchmark/distributions/PoissonGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/PoissonGenerator.java
rename to src/main/java/com/olxpbenchmark/distributions/PoissonGenerator.java
diff --git a/src/com/olxpbenchmark/distributions/ScrambledZipfianGenerator.java b/src/main/java/com/olxpbenchmark/distributions/ScrambledZipfianGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/ScrambledZipfianGenerator.java
rename to src/main/java/com/olxpbenchmark/distributions/ScrambledZipfianGenerator.java
diff --git a/src/com/olxpbenchmark/distributions/Utils.java b/src/main/java/com/olxpbenchmark/distributions/Utils.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/Utils.java
rename to src/main/java/com/olxpbenchmark/distributions/Utils.java
diff --git a/src/com/olxpbenchmark/distributions/ZipFianDistribution.java b/src/main/java/com/olxpbenchmark/distributions/ZipFianDistribution.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/ZipFianDistribution.java
rename to src/main/java/com/olxpbenchmark/distributions/ZipFianDistribution.java
diff --git a/src/com/olxpbenchmark/distributions/ZipfianGenerator.java b/src/main/java/com/olxpbenchmark/distributions/ZipfianGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/distributions/ZipfianGenerator.java
rename to src/main/java/com/olxpbenchmark/distributions/ZipfianGenerator.java
diff --git a/src/com/olxpbenchmark/jdbc/AutoIncrementPreparedStatement.java b/src/main/java/com/olxpbenchmark/jdbc/AutoIncrementPreparedStatement.java
similarity index 100%
rename from src/com/olxpbenchmark/jdbc/AutoIncrementPreparedStatement.java
rename to src/main/java/com/olxpbenchmark/jdbc/AutoIncrementPreparedStatement.java
diff --git a/src/com/olxpbenchmark/types/DatabaseType.java b/src/main/java/com/olxpbenchmark/types/DatabaseType.java
similarity index 100%
rename from src/com/olxpbenchmark/types/DatabaseType.java
rename to src/main/java/com/olxpbenchmark/types/DatabaseType.java
diff --git a/src/com/olxpbenchmark/types/SortDirectionType.java b/src/main/java/com/olxpbenchmark/types/SortDirectionType.java
similarity index 100%
rename from src/com/olxpbenchmark/types/SortDirectionType.java
rename to src/main/java/com/olxpbenchmark/types/SortDirectionType.java
diff --git a/src/com/olxpbenchmark/types/State.java b/src/main/java/com/olxpbenchmark/types/State.java
similarity index 100%
rename from src/com/olxpbenchmark/types/State.java
rename to src/main/java/com/olxpbenchmark/types/State.java
diff --git a/src/com/olxpbenchmark/types/TransactionStatus.java b/src/main/java/com/olxpbenchmark/types/TransactionStatus.java
similarity index 100%
rename from src/com/olxpbenchmark/types/TransactionStatus.java
rename to src/main/java/com/olxpbenchmark/types/TransactionStatus.java
diff --git a/src/com/olxpbenchmark/util/ClassUtil.java b/src/main/java/com/olxpbenchmark/util/ClassUtil.java
similarity index 97%
rename from src/com/olxpbenchmark/util/ClassUtil.java
rename to src/main/java/com/olxpbenchmark/util/ClassUtil.java
index 3af2ca8..fa36d6d 100644
--- a/src/com/olxpbenchmark/util/ClassUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/ClassUtil.java
@@ -30,9 +30,10 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.collections15.CollectionUtils;
-import org.apache.commons.lang.ClassUtils;
-import org.apache.log4j.Logger;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ClassUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -40,7 +41,7 @@
*
*/
public abstract class ClassUtil {
- private static final Logger LOG = Logger.getLogger(ClassUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ClassUtil.class);
private static final Class>[] EMPTY_ARRAY = new Class[] {};
diff --git a/src/com/olxpbenchmark/util/CollectionUtil.java b/src/main/java/com/olxpbenchmark/util/CollectionUtil.java
similarity index 99%
rename from src/com/olxpbenchmark/util/CollectionUtil.java
rename to src/main/java/com/olxpbenchmark/util/CollectionUtil.java
index aa608d8..bded00e 100644
--- a/src/com/olxpbenchmark/util/CollectionUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/CollectionUtil.java
@@ -30,8 +30,8 @@
import java.util.Set;
import java.util.SortedMap;
-import org.apache.commons.collections15.set.ListOrderedSet;
-import org.apache.commons.lang.NotImplementedException;
+import org.apache.commons.collections4.set.ListOrderedSet;
+import org.apache.commons.lang3.NotImplementedException;
/**
*
diff --git a/src/com/olxpbenchmark/util/CompositeId.java b/src/main/java/com/olxpbenchmark/util/CompositeId.java
similarity index 100%
rename from src/com/olxpbenchmark/util/CompositeId.java
rename to src/main/java/com/olxpbenchmark/util/CompositeId.java
diff --git a/src/com/olxpbenchmark/util/EventObservable.java b/src/main/java/com/olxpbenchmark/util/EventObservable.java
similarity index 100%
rename from src/com/olxpbenchmark/util/EventObservable.java
rename to src/main/java/com/olxpbenchmark/util/EventObservable.java
diff --git a/src/com/olxpbenchmark/util/EventObservableExceptionHandler.java b/src/main/java/com/olxpbenchmark/util/EventObservableExceptionHandler.java
similarity index 100%
rename from src/com/olxpbenchmark/util/EventObservableExceptionHandler.java
rename to src/main/java/com/olxpbenchmark/util/EventObservableExceptionHandler.java
diff --git a/src/com/olxpbenchmark/util/EventObserver.java b/src/main/java/com/olxpbenchmark/util/EventObserver.java
similarity index 100%
rename from src/com/olxpbenchmark/util/EventObserver.java
rename to src/main/java/com/olxpbenchmark/util/EventObserver.java
diff --git a/src/com/olxpbenchmark/util/ExceptionHandlingRunnable.java b/src/main/java/com/olxpbenchmark/util/ExceptionHandlingRunnable.java
similarity index 100%
rename from src/com/olxpbenchmark/util/ExceptionHandlingRunnable.java
rename to src/main/java/com/olxpbenchmark/util/ExceptionHandlingRunnable.java
diff --git a/src/com/olxpbenchmark/util/FileUtil.java b/src/main/java/com/olxpbenchmark/util/FileUtil.java
similarity index 98%
rename from src/com/olxpbenchmark/util/FileUtil.java
rename to src/main/java/com/olxpbenchmark/util/FileUtil.java
index cfb4fd9..de1e8fe 100644
--- a/src/com/olxpbenchmark/util/FileUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/FileUtil.java
@@ -18,7 +18,8 @@
import java.io.*;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
@@ -29,7 +30,7 @@
* @author pavlo
*/
public abstract class FileUtil {
- private static final Logger LOG = Logger.getLogger(FileUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(FileUtil.class);
private static final Pattern EXT_SPLIT = Pattern.compile("\\.");
@@ -95,7 +96,7 @@ public static String realpath(String path) {
try {
ret = f.getCanonicalPath();
} catch (Exception ex) {
- LOG.warn(ex);
+ LOG.warn(ex.getMessage());
}
return (ret);
}
@@ -309,10 +310,10 @@ public static byte[] readBytesFromFile(String path) throws IOException {
while ((offset < bytes.length) && ((numRead = in.read(bytes, offset, bytes.length - offset)) >= 0)) {
offset += numRead;
} // WHILE
+ in.close();
if (offset < bytes.length) {
throw new IOException("Failed to read the entire contents of '" + file.getName() + "'");
}
- in.close();
return (bytes);
}
diff --git a/src/com/olxpbenchmark/util/Histogram.java b/src/main/java/com/olxpbenchmark/util/Histogram.java
similarity index 99%
rename from src/com/olxpbenchmark/util/Histogram.java
rename to src/main/java/com/olxpbenchmark/util/Histogram.java
index 38fd3ab..74119ad 100644
--- a/src/com/olxpbenchmark/util/Histogram.java
+++ b/src/main/java/com/olxpbenchmark/util/Histogram.java
@@ -21,7 +21,8 @@
import java.util.*;
import java.util.Map.Entry;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.util.json.*;
@@ -32,7 +33,7 @@
* @author pavlo
*/
public class Histogram implements JSONSerializable {
- private static final Logger LOG = Logger.getLogger(Histogram.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Histogram.class);
private static final String MARKER = "*";
private static final Integer MAX_CHARS = 80;
diff --git a/src/com/olxpbenchmark/util/JSONSerializable.java b/src/main/java/com/olxpbenchmark/util/JSONSerializable.java
similarity index 100%
rename from src/com/olxpbenchmark/util/JSONSerializable.java
rename to src/main/java/com/olxpbenchmark/util/JSONSerializable.java
diff --git a/src/com/olxpbenchmark/util/JSONUtil.java b/src/main/java/com/olxpbenchmark/util/JSONUtil.java
similarity index 99%
rename from src/com/olxpbenchmark/util/JSONUtil.java
rename to src/main/java/com/olxpbenchmark/util/JSONUtil.java
index 9624025..33301cc 100644
--- a/src/com/olxpbenchmark/util/JSONUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/JSONUtil.java
@@ -32,7 +32,8 @@
import java.util.Set;
import java.util.Stack;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.util.json.JSONArray;
import com.olxpbenchmark.util.json.JSONException;
@@ -43,7 +44,7 @@
* @author pavlo
*/
public abstract class JSONUtil {
- private static final Logger LOG = Logger.getLogger(JSONUtil.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(JSONUtil.class.getName());
private static final String JSON_CLASS_SUFFIX = "_class";
private static final Map, Field[]> SERIALIZABLE_FIELDS = new HashMap, Field[]>();
diff --git a/src/com/olxpbenchmark/util/LatchedExceptionHandler.java b/src/main/java/com/olxpbenchmark/util/LatchedExceptionHandler.java
similarity index 100%
rename from src/com/olxpbenchmark/util/LatchedExceptionHandler.java
rename to src/main/java/com/olxpbenchmark/util/LatchedExceptionHandler.java
diff --git a/src/com/olxpbenchmark/util/MeasureTargetSystem.java b/src/main/java/com/olxpbenchmark/util/MeasureTargetSystem.java
similarity index 100%
rename from src/com/olxpbenchmark/util/MeasureTargetSystem.java
rename to src/main/java/com/olxpbenchmark/util/MeasureTargetSystem.java
diff --git a/src/com/olxpbenchmark/util/MysqlGetStats.java b/src/main/java/com/olxpbenchmark/util/MysqlGetStats.java
similarity index 100%
rename from src/com/olxpbenchmark/util/MysqlGetStats.java
rename to src/main/java/com/olxpbenchmark/util/MysqlGetStats.java
diff --git a/src/com/olxpbenchmark/util/Pair.java b/src/main/java/com/olxpbenchmark/util/Pair.java
similarity index 100%
rename from src/com/olxpbenchmark/util/Pair.java
rename to src/main/java/com/olxpbenchmark/util/Pair.java
diff --git a/src/com/olxpbenchmark/util/QueueLimitException.java b/src/main/java/com/olxpbenchmark/util/QueueLimitException.java
similarity index 100%
rename from src/com/olxpbenchmark/util/QueueLimitException.java
rename to src/main/java/com/olxpbenchmark/util/QueueLimitException.java
diff --git a/src/com/olxpbenchmark/util/RandomDistribution.java b/src/main/java/com/olxpbenchmark/util/RandomDistribution.java
similarity index 100%
rename from src/com/olxpbenchmark/util/RandomDistribution.java
rename to src/main/java/com/olxpbenchmark/util/RandomDistribution.java
diff --git a/src/com/olxpbenchmark/util/RandomGenerator.java b/src/main/java/com/olxpbenchmark/util/RandomGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/util/RandomGenerator.java
rename to src/main/java/com/olxpbenchmark/util/RandomGenerator.java
diff --git a/src/com/olxpbenchmark/util/ResultUploader.java b/src/main/java/com/olxpbenchmark/util/ResultUploader.java
similarity index 95%
rename from src/com/olxpbenchmark/util/ResultUploader.java
rename to src/main/java/com/olxpbenchmark/util/ResultUploader.java
index e835b6d..a98f7f4 100644
--- a/src/com/olxpbenchmark/util/ResultUploader.java
+++ b/src/main/java/com/olxpbenchmark/util/ResultUploader.java
@@ -23,8 +23,8 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.ParseException;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.commons.configuration2.XMLConfiguration;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
@@ -34,7 +34,9 @@
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.configuration2.io.FileHandler;
import java.io.*;
import java.util.Date;
@@ -45,7 +47,7 @@
import java.util.zip.GZIPOutputStream;
public class ResultUploader {
- private static final Logger LOG = Logger.getLogger(ResultUploader.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ResultUploader.class);
private static String[] IGNORE_CONF = {
"dbtype",
@@ -118,7 +120,8 @@ public void writeBenchmarkConf(PrintStream os) throws ConfigurationException {
for (String key : IGNORE_CONF) {
outputConf.clearProperty(key);
}
- outputConf.save(os);
+ FileHandler handler = new FileHandler(outputConf);
+ handler.save(os);
}
public void writeSummary(PrintStream os) {
diff --git a/src/com/olxpbenchmark/util/SQLUtil.java b/src/main/java/com/olxpbenchmark/util/SQLUtil.java
similarity index 99%
rename from src/com/olxpbenchmark/util/SQLUtil.java
rename to src/main/java/com/olxpbenchmark/util/SQLUtil.java
index 1df1a2b..90ea669 100644
--- a/src/com/olxpbenchmark/util/SQLUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/SQLUtil.java
@@ -30,14 +30,15 @@
import java.util.HashSet;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.olxpbenchmark.catalog.Column;
import com.olxpbenchmark.catalog.Table;
import com.olxpbenchmark.types.DatabaseType;
public abstract class SQLUtil {
- private static final Logger LOG = Logger.getLogger(SQLUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SQLUtil.class);
private static final DateFormat timestamp_formats[] = new DateFormat[] {
new SimpleDateFormat("yyyy-MM-dd"),
diff --git a/src/com/olxpbenchmark/util/SSHGetStats.java b/src/main/java/com/olxpbenchmark/util/SSHGetStats.java
similarity index 100%
rename from src/com/olxpbenchmark/util/SSHGetStats.java
rename to src/main/java/com/olxpbenchmark/util/SSHGetStats.java
diff --git a/src/com/olxpbenchmark/util/ScriptRunner.java b/src/main/java/com/olxpbenchmark/util/ScriptRunner.java
similarity index 98%
rename from src/com/olxpbenchmark/util/ScriptRunner.java
rename to src/main/java/com/olxpbenchmark/util/ScriptRunner.java
index 46dfdb6..45433dc 100644
--- a/src/com/olxpbenchmark/util/ScriptRunner.java
+++ b/src/main/java/com/olxpbenchmark/util/ScriptRunner.java
@@ -28,14 +28,15 @@
import java.io.Reader;
import java.sql.*;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Tool to run database scripts
* http://pastebin.com/f10584951
*/
public class ScriptRunner {
- private static final Logger LOG = Logger.getLogger(ScriptRunner.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ScriptRunner.class);
private static final String DEFAULT_DELIMITER = ";";
diff --git a/src/com/olxpbenchmark/util/SimplePrinter.java b/src/main/java/com/olxpbenchmark/util/SimplePrinter.java
similarity index 100%
rename from src/com/olxpbenchmark/util/SimplePrinter.java
rename to src/main/java/com/olxpbenchmark/util/SimplePrinter.java
diff --git a/src/com/olxpbenchmark/util/SimpleSystemPrinter.java b/src/main/java/com/olxpbenchmark/util/SimpleSystemPrinter.java
similarity index 100%
rename from src/com/olxpbenchmark/util/SimpleSystemPrinter.java
rename to src/main/java/com/olxpbenchmark/util/SimpleSystemPrinter.java
diff --git a/src/com/olxpbenchmark/util/StatisticsCollector.java b/src/main/java/com/olxpbenchmark/util/StatisticsCollector.java
similarity index 100%
rename from src/com/olxpbenchmark/util/StatisticsCollector.java
rename to src/main/java/com/olxpbenchmark/util/StatisticsCollector.java
diff --git a/src/com/olxpbenchmark/util/StatsHolder.java b/src/main/java/com/olxpbenchmark/util/StatsHolder.java
similarity index 100%
rename from src/com/olxpbenchmark/util/StatsHolder.java
rename to src/main/java/com/olxpbenchmark/util/StatsHolder.java
diff --git a/src/com/olxpbenchmark/util/StringBoxUtil.java b/src/main/java/com/olxpbenchmark/util/StringBoxUtil.java
similarity index 100%
rename from src/com/olxpbenchmark/util/StringBoxUtil.java
rename to src/main/java/com/olxpbenchmark/util/StringBoxUtil.java
diff --git a/src/com/olxpbenchmark/util/StringUtil.java b/src/main/java/com/olxpbenchmark/util/StringUtil.java
similarity index 99%
rename from src/com/olxpbenchmark/util/StringUtil.java
rename to src/main/java/com/olxpbenchmark/util/StringUtil.java
index 71d2e68..2452ca0 100644
--- a/src/com/olxpbenchmark/util/StringUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/StringUtil.java
@@ -16,12 +16,9 @@
package com.olxpbenchmark.util;
-import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
@@ -513,6 +510,7 @@ public static String addSpacers(String str) {
* @param items
* @return
*/
+ @SafeVarargs
public static String join(String delimiter, T... items) {
return (join(delimiter, Arrays.asList(items)));
}
diff --git a/src/com/olxpbenchmark/util/TableDataIterable.java b/src/main/java/com/olxpbenchmark/util/TableDataIterable.java
similarity index 99%
rename from src/com/olxpbenchmark/util/TableDataIterable.java
rename to src/main/java/com/olxpbenchmark/util/TableDataIterable.java
index 6f3ad31..f737b2e 100644
--- a/src/com/olxpbenchmark/util/TableDataIterable.java
+++ b/src/main/java/com/olxpbenchmark/util/TableDataIterable.java
@@ -19,7 +19,7 @@
import java.io.File;
import java.util.Iterator;
-import au.com.bytecode.opencsv.CSVReader;
+import com.opencsv.CSVReader;
import com.olxpbenchmark.catalog.Column;
import com.olxpbenchmark.catalog.Table;
diff --git a/src/com/olxpbenchmark/util/TextGenerator.java b/src/main/java/com/olxpbenchmark/util/TextGenerator.java
similarity index 100%
rename from src/com/olxpbenchmark/util/TextGenerator.java
rename to src/main/java/com/olxpbenchmark/util/TextGenerator.java
diff --git a/src/com/olxpbenchmark/util/ThreadUtil.java b/src/main/java/com/olxpbenchmark/util/ThreadUtil.java
similarity index 97%
rename from src/com/olxpbenchmark/util/ThreadUtil.java
rename to src/main/java/com/olxpbenchmark/util/ThreadUtil.java
index 2f64b21..3a8337c 100644
--- a/src/com/olxpbenchmark/util/ThreadUtil.java
+++ b/src/main/java/com/olxpbenchmark/util/ThreadUtil.java
@@ -39,10 +39,11 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class ThreadUtil {
- private static final Logger LOG = Logger.getLogger(ThreadUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ThreadUtil.class);
private static final Object lock = new Object();
private static ExecutorService pool;
@@ -125,7 +126,7 @@ public static Pair exec(String command[]) {
pid_field.setAccessible(true);
pid = pid_field.getInt(p);
} catch (Exception ex) {
- LOG.fatal("Faild to get pid for " + p, ex);
+ LOG.error("Faild to get pid for " + p, ex);
return (null);
}
assert (pid != null) : "Failed to get pid for " + p;
@@ -162,7 +163,7 @@ public static void fork(String command[], final EventObservable stop_obse
try {
temp = pb.start();
} catch (IOException e) {
- LOG.fatal("Failed to fork command", e);
+ LOG.error("Failed to fork command", e);
return;
}
assert (temp != null);
@@ -307,7 +308,7 @@ private static final void run(final Collection runnables
try {
latch.await();
} catch (InterruptedException ex) {
- LOG.fatal("ThreadUtil.run() was interupted!", ex);
+ LOG.error("ThreadUtil.run() was interupted!", ex);
throw new RuntimeException(ex);
} finally {
if (handler.hasError()) {
diff --git a/src/com/olxpbenchmark/util/TimeUtil.java b/src/main/java/com/olxpbenchmark/util/TimeUtil.java
similarity index 100%
rename from src/com/olxpbenchmark/util/TimeUtil.java
rename to src/main/java/com/olxpbenchmark/util/TimeUtil.java
diff --git a/src/com/olxpbenchmark/util/json/JSONArray.java b/src/main/java/com/olxpbenchmark/util/json/JSONArray.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONArray.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONArray.java
diff --git a/src/com/olxpbenchmark/util/json/JSONException.java b/src/main/java/com/olxpbenchmark/util/json/JSONException.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONException.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONException.java
diff --git a/src/com/olxpbenchmark/util/json/JSONObject.java b/src/main/java/com/olxpbenchmark/util/json/JSONObject.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONObject.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONObject.java
diff --git a/src/com/olxpbenchmark/util/json/JSONString.java b/src/main/java/com/olxpbenchmark/util/json/JSONString.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONString.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONString.java
diff --git a/src/com/olxpbenchmark/util/json/JSONStringer.java b/src/main/java/com/olxpbenchmark/util/json/JSONStringer.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONStringer.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONStringer.java
diff --git a/src/com/olxpbenchmark/util/json/JSONTokener.java b/src/main/java/com/olxpbenchmark/util/json/JSONTokener.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONTokener.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONTokener.java
diff --git a/src/com/olxpbenchmark/util/json/JSONWriter.java b/src/main/java/com/olxpbenchmark/util/json/JSONWriter.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/JSONWriter.java
rename to src/main/java/com/olxpbenchmark/util/json/JSONWriter.java
diff --git a/src/com/olxpbenchmark/util/json/Test.java b/src/main/java/com/olxpbenchmark/util/json/Test.java
similarity index 100%
rename from src/com/olxpbenchmark/util/json/Test.java
rename to src/main/java/com/olxpbenchmark/util/json/Test.java
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-ddl.sql b/src/main/resources/benchmarks/web3bench/web3bench-ddl.sql
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-ddl.sql
rename to src/main/resources/benchmarks/web3bench/web3bench-ddl.sql
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-mysql-ddl.sql b/src/main/resources/benchmarks/web3bench/web3bench-mysql-ddl.sql
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-mysql-ddl.sql
rename to src/main/resources/benchmarks/web3bench/web3bench-mysql-ddl.sql
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-sdb-ddl.sql b/src/main/resources/benchmarks/web3bench/web3bench-sdb-ddl.sql
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-sdb-ddl.sql
rename to src/main/resources/benchmarks/web3bench/web3bench-sdb-ddl.sql
diff --git a/src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-tidb-ddl.sql b/src/main/resources/benchmarks/web3bench/web3bench-tidb-ddl.sql
similarity index 100%
rename from src/com/olxpbenchmark/benchmarks/web3benchmark/ddls/web3bench-tidb-ddl.sql
rename to src/main/resources/benchmarks/web3bench/web3bench-tidb-ddl.sql
diff --git a/log4j.properties b/src/main/resources/log4j.properties
similarity index 100%
rename from log4j.properties
rename to src/main/resources/log4j.properties
diff --git a/src/test/java/com/olxpbenchmark/AppTest.java b/src/test/java/com/olxpbenchmark/AppTest.java
new file mode 100644
index 0000000..e855a65
--- /dev/null
+++ b/src/test/java/com/olxpbenchmark/AppTest.java
@@ -0,0 +1,18 @@
+package com.olxpbenchmark;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest {
+ /**
+ * Rigorous Test :-)
+ */
+ @Test
+ public void shouldAnswerWithTrue() {
+ assertTrue(true);
+ }
+}
diff --git a/tests/.gitignore b/tests/.gitignore
deleted file mode 100644
index e69de29..0000000