This commit is contained in:
zyyang 2021-01-27 15:20:35 +08:00
parent 61a1563864
commit 224b850b62
1 changed files with 3 additions and 3 deletions

View File

@ -27,8 +27,7 @@ public class ConnectionPoolDemo {
private static int poolSize = 50;
private static int threadCount = 50;
private static int sleep = 1000;
private static int sleep = 0;
public static void main(String[] args) {
String host = null;
@ -98,6 +97,7 @@ public class ConnectionPoolDemo {
executor.execute(new InsertTask(dataSource, dbName, tableSize, batchSize));
// sleep few seconds
try {
if (sleep > 0)
TimeUnit.MILLISECONDS.sleep(sleep);
} catch (InterruptedException e) {
e.printStackTrace();