shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/singlerouting/JMeterJDBCSingleRoutingSelect.java [24:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCRangeRoutingEncryptSelect");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.singlerouting.masterslave.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.singlerouting.masterslave.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/singlerouting/encrypt/JMeterJDBCSingleRoutingEncryptSelect.java [27:55]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCRangeRoutingEncryptSelect");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.singlerouting.encrypt.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.singlerouting.encrypt.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/fullroutingsmallshards/sharding/JMeterJDBCFullRoutingSmallShardsShardingSelect.java [24:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("SJPerformanceMSInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.fullrouting.sharding.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.fullrouting.sharding.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/fullroutingsmallshards/shardingmasterslaveencrypt/JMeterJDBCFullRoutingSmallShardsShardingMasterSlaveEncryptSelect.java [24:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("SJPerformanceMSInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.fullrouting.shardingmasterslaveencrypt.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.fullrouting.shardingmasterslaveencrypt.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/rangerouting/JMeterJDBCRangeRoutingSelect.java [24:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCRangeRoutingEncryptSelect");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.rangerouting.masterslave.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.rangerouting.masterslave.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/rangerouting/encrypt/JMeterJDBCRangeRoutingEncryptSelect.java [27:55]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCRangeRoutingEncryptSelect");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String selectSql = (String) sqlConfig.get("jdbc.benchmark.rangerouting.encrypt.select.sql");
            List selectParams = convertParams((List) sqlConfig.get("jdbc.benchmark.rangerouting.encrypt.select.values"));
            JDBCDataSourceUtil.select(connection, selectSql, selectParams);
        } catch (SQLException e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } catch (Exception e) {
            results.setSuccessful(false);
            e.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            results.sampleEnd();
        }

        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



