This commit is contained in:
zyyang 2020-12-21 17:26:19 +08:00
parent 7f147e0550
commit 85f438db23
2 changed files with 6 additions and 6 deletions

View File

@ -85,10 +85,10 @@ public class TaosDemoApplication {
start = System.currentTimeMillis(); start = System.currentTimeMillis();
if (config.doCreateTable) { if (config.doCreateTable) {
superTableService.create(superTableMeta); superTableService.create(superTableMeta);
if (config.autoCreateTable) if (!config.autoCreateTable){
return; // 批量建子表
// 批量建子表 subTableService.createSubTable(superTableMeta, config.numOfTables, config.prefixOfTable, config.numOfThreadsForCreate);
subTableService.createSubTable(superTableMeta, config.numOfTables, config.prefixOfTable, config.numOfThreadsForCreate); }
} }
end = System.currentTimeMillis(); end = System.currentTimeMillis();
logger.info(">>> create table time cost : " + (end - start) + " ms."); logger.info(">>> create table time cost : " + (end - start) + " ms.");

View File

@ -27,8 +27,8 @@ public final class JdbcTaosdemoConfig {
public boolean autoCreateTable = true; public boolean autoCreateTable = true;
public long numOfTables = 10; public long numOfTables = 10;
public long numOfRowsPerTable = 10; public long numOfRowsPerTable = 10;
public int numOfTablesPerSQL = 2; public int numOfTablesPerSQL = 1;
public int numOfValuesPerSQL = 2; public int numOfValuesPerSQL = 1;
public int numOfThreadsForCreate = 1; public int numOfThreadsForCreate = 1;
public int numOfThreadsForInsert = 1; public int numOfThreadsForInsert = 1;
public long startTime; public long startTime;