提交 a4fe566c 编写于 作者: Z zyyang

change

上级 995284cc
...@@ -116,6 +116,8 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner { ...@@ -116,6 +116,8 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner {
if (numOfTables < numOfTablesPerSQL) if (numOfTables < numOfTablesPerSQL)
numOfTablesPerSQL = numOfTables; numOfTablesPerSQL = numOfTables;
long timeCost = 0;
// row // row
for (int rowCnt = 0; rowCnt < numOfRowsPerTable; ) { for (int rowCnt = 0; rowCnt < numOfRowsPerTable; ) {
int rowSize = numOfValuesPerSQL; int rowSize = numOfValuesPerSQL;
...@@ -150,6 +152,7 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner { ...@@ -150,6 +152,7 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner {
subTableService.insertAutoCreateTable(data, config.numOfThreadsForInsert, config.frequency); subTableService.insertAutoCreateTable(data, config.numOfThreadsForInsert, config.frequency);
long b = System.currentTimeMillis(); long b = System.currentTimeMillis();
logger.info(">>> time cost: " + (b - a) + " ms"); logger.info(">>> time cost: " + (b - a) + " ms");
timeCost += (b - a);
} else { } else {
subTableService.insert(data, config.numOfThreadsForInsert, config.frequency); subTableService.insert(data, config.numOfThreadsForInsert, config.frequency);
} }
...@@ -175,7 +178,7 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner { ...@@ -175,7 +178,7 @@ public class TaosDemoCommandLineRunner implements CommandLineRunner {
// subTableService.insert(subTableMetaList, config.numOfTables, config.tablePrefix, config.numOfThreadsForInsert, config.frequency); // subTableService.insert(subTableMetaList, config.numOfTables, config.tablePrefix, config.numOfThreadsForInsert, config.frequency);
// } // }
long end = System.currentTimeMillis(); long end = System.currentTimeMillis();
logger.info(">>> insert time cost : " + (end - start) + " ms."); logger.info(">>> total : " + (end - start) + " ms, insert : " + (timeCost) + " ms.");
} }
private void prepareMetaData(JdbcTaosdemoConfig config) { private void prepareMetaData(JdbcTaosdemoConfig config) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册