shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/shardingsphere/sharding/JMeterShardingSphereCommonShardingInsert.java [33:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterShardingSphereCommonShardingInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.ss.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.ss.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/shardingsphere/sharding/JMeterShardingSphereCommonSmallShardsShardingInsert.java [34:61]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

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

        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.ss.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.ss.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/shardingsphere/masterslave/JMeterShardingSphereCommonMasterSlaveInsert.java [33:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterShardingSphereCommonMasterSlaveInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.ss.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.ss.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/shardingsphere/encrypt/JMeterShardingSphereCommonEncryptInsert.java [33:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterShardingSphereCommonEncryptInsert");
        results.sampleStart();
        Connection connection = null;
        
        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.ss.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.ss.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/jdbc/sharding/JMeterJDBCCommonShardingInsert.java [26:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCCommonShardingInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.jdbc.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.jdbc.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/jdbc/masterslave/JMeterJDBCCommonMasterSlaveInsert.java [26:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCCommonMasterSlaveInsert");
        results.sampleStart();
        Connection connection = null;

        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.jdbc.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.jdbc.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/jmeter/common/datapreparation/jdbc/encrypt/JMeterJDBCCommonEncryptInsert.java [26:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public SampleResult runTest(JavaSamplerContext context) {

        SampleResult results = new SampleResult();
        results.setSampleLabel("JMeterJDBCCommonEncryptInsert");
        results.sampleStart();
        Connection connection = null;
        try {
            connection = dataSource.getConnection();
            String insertSql = (String) sqlConfig.get("common.jdbc.insert.sql");
            List insertParams = convertParams((List) sqlConfig.get("common.jdbc.insert.values"), r.nextInt(tableCount));
            JDBCDataSourceUtil.insert(connection, insertSql, insertParams);
        } catch (SQLException ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } catch (Exception ex) {
            results.setSuccessful(false);
            ex.printStackTrace();
        } finally {
            try {
                connection.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            results.sampleEnd();
        }
        return results;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



