From 87aeb2d917254b9f4706769b4922af7d0930bbe1 Mon Sep 17 00:00:00 2001 From: zyyang Date: Fri, 13 Nov 2020 09:50:41 +0800 Subject: [PATCH] a readme for run connectionPoolDemo --- .../JDBC/connectionPools/README-cn.md | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/examples/JDBC/connectionPools/README-cn.md b/tests/examples/JDBC/connectionPools/README-cn.md index 79c27ad06b..761596dfc5 100644 --- a/tests/examples/JDBC/connectionPools/README-cn.md +++ b/tests/examples/JDBC/connectionPools/README-cn.md @@ -4,9 +4,30 @@ * druid * HikariCP -如何运行这个例子: -```shell script +### 说明 +ConnectionPoolDemo的程序逻辑: +1. 创建到host的connection连接池 +2. 创建名称为pool_test的database,创建表超级weather,创建tableSize个子表 +3. 不断向所有子表进行插入。 +### 如何运行这个例子: +```shell script +# mvn exec:java -Dexec.mainClass="com.taosdata.demo.ConnectionPoolDemo" -Dexec.args="-host localhost" +``` +使用mvn运行ConnectionPoolDemo的main方法,可以指定参数 +```shell script +Usage: +mvn exec:java -Dexec.mainClass="com.taosdata.demo.ConnectionPoolDemo" -Dexec.args="" +-host : hostname +-poolType +-poolSize +-tableSize +-batchSize : 每条Insert SQL中values的数量 +-sleep : 每次插入任务提交后的 +``` +### 如何停止程序: +ConnectionPoolDemo不会自己停止,会一直执行插入,需要手动Ctrl+C运行。 -``` +### 日志 +使用log4j,将日志和错误分别输出到了debug.log和error.log中 \ No newline at end of file -- GitLab