You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/10 07:28:31 UTC

[GitHub] [shardingsphere-benchmark] wcsoft opened a new pull request #58: Update

wcsoft opened a new pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] wcsoft closed pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
wcsoft closed pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] tristaZero commented on a change in pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58#discussion_r486815491



##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] tristaZero commented on a change in pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58#discussion_r486815491



##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] tristaZero commented on a change in pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58#discussion_r486813358



##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] wcsoft closed pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
wcsoft closed pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] wcsoft closed pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
wcsoft closed pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] wcsoft closed pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
wcsoft closed pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-benchmark] tristaZero commented on a change in pull request #58: Update ShardingSphere benchmark with new implementation.

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #58:
URL: https://github.com/apache/shardingsphere-benchmark/pull/58#discussion_r486815491



##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?

##########
File path: shardingsphere-benchmark/src/main/resources/yaml/singlerouting/encrypt/proxy/config-proxy-singlerouting-encrypt.yaml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSourceCommon:
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 200
+  minPoolSize: 200
+  maintenanceIntervalMilliseconds: 30000
+
+dataSources:
+  baitiao_test:
+    url: jdbc:mysql://ss.benchmark.singlerouting.encrypt.ds0:3306/baitiao_test?serverTimezone=UTC&useSSL=false

Review comment:
       Please replace `baitiao` with another name.

##########
File path: shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/xml/BenchmarkConfigJmx.java
##########
@@ -0,0 +1,182 @@
+package org.apache.shardingsphere.benchmark.common.file.xml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Benchmark config jmx.
+ */
+public final class BenchmarkConfigJmx {
+    
+    public static FileFilter jmxFilter = new JmxFileFilter();
+    
+    /**
+     * Modify benchmark output directory for jmx with configured root path in the user-config.properties. 
+     * @param benchmarkBasePath
+     * @param benchmarkOutputBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     */
+    public static void modifyBenchmarkOutputBasePath(String benchmarkBasePath, String benchmarkOutputBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        File jmxFile = null;
+        List<File> jmxFileList = getJmxFileList(benchmarkBasePath);
+        for (int i = 0; i < jmxFileList.size(); i++){
+            jmxFile = jmxFileList.get(i);
+            Document xmlDocument = getOutputElement(jmxFile, benchmarkOutputBasePath, jmeterConcurrencyCount, jmeterLoopCount);
+            saveJmxFile(jmxFile, xmlDocument);
+        }
+    }
+    
+    /**
+     * Filter target files with its suffix.
+     * @param targetDir
+     * @param filter
+     * @param resultFiles
+     * @return
+     */
+    public static List<File> filterTargetFiles(File targetDir, FileFilter filter, List<File> resultFiles) {
+        File[] files = targetDir.listFiles(filter);
+        for (File file : files) {
+            if (file.isDirectory()) {
+                filterTargetFiles(file, filter, resultFiles);
+            } else {
+                resultFiles.add(file);
+            }
+        }
+        return resultFiles;
+    }
+    
+    /**
+     * Get all of jmx files.
+     * @param benchmarkBasePath
+     * @return
+     */
+    public static List<File> getJmxFileList(String benchmarkBasePath){
+        
+        List<File> jmxFileList = new ArrayList<File>(10);
+        String jmxBasePath = benchmarkBasePath + "/src/main/resources/testplan";
+        File jmxBaseDir = new File(jmxBasePath);
+        return filterTargetFiles(jmxBaseDir, jmxFilter, jmxFileList);
+    }
+    
+    /**
+     * Save jmx file.
+     * @param testPlanFile
+     * @param xmlDocument
+     */
+    public static void saveJmxFile(File testPlanFile, Document xmlDocument){
+        TransformerFactory transFactory = TransformerFactory.newInstance();
+        Transformer transformer = null;
+        try {
+            transformer = transFactory.newTransformer();
+            transformer.setOutputProperty("indent", "yes");
+            DOMSource source = new DOMSource();
+            source.setNode(xmlDocument);
+            StreamResult result = new StreamResult();
+            result.setOutputStream(new FileOutputStream(testPlanFile));
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException ex) {
+            ex.printStackTrace();
+        } catch (FileNotFoundException ex) {
+            ex.printStackTrace();
+        } catch (TransformerException ex) {
+            ex.printStackTrace();
+        } finally {}
+    
+    }
+    
+    /**
+     * Get xml element of jmx.
+     * @param testPlanFile
+     * @param outPutBasePath
+     * @param jmeterConcurrencyCount
+     * @param jmeterLoopCount
+     * @return
+     */
+    public static Document getOutputElement(File testPlanFile, String outPutBasePath, int jmeterConcurrencyCount, int jmeterLoopCount){
+        Element root = null;
+        Document result = null;
+        DocumentBuilder documentBuilder = null;
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setIgnoringElementContentWhitespace(true);
+        try {
+            documentBuilder = factory.newDocumentBuilder();
+            result = (Document) documentBuilder.parse(testPlanFile);
+            root = result.getDocumentElement();
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            XPath xpath = xpathFactory.newXPath();
+            String resultCollectorXpath = "//jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/ResultCollector";

Review comment:
       A variable is needed.

##########
File path: shardingsphere-benchmark/pom.xml
##########
@@ -1,50 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>shardingsphere-benchmark</groupId>
     <artifactId>shardingsphere-benchmark</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    
+    <version>1.1-SNAPSHOT</version>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-core-api</artifactId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-executor</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-kernel-context</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-api</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-sharding-route</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-common</artifactId>
+            <version>[5.0.0-RC1-SNAPSHOT,)</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-encrypt-api</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
+            <artifactId>shardingsphere-encrypt-common</artifactId>
             <version>[5.0.0-RC1-SNAPSHOT,)</version>
         </dependency>
+
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
+            <version>2.10.0</version>
         </dependency>
         <dependency>
-            <groupId>io.shardingsphere</groupId>
-            <artifactId>sharding-jdbc-core</artifactId>
-            <version>3.1.0</version>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>3.4.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.apache.shardingsphere</groupId>-->
+        <!--<artifactId>sharding-core-api</artifactId>-->
+        <!--<version>[5.0.0-RC1-SNAPSHOT,)</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->

Review comment:
       If there are not required, why do not you remove them?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org