change
This commit is contained in:
parent
61a1563864
commit
224b850b62
|
@ -27,8 +27,7 @@ public class ConnectionPoolDemo {
|
||||||
|
|
||||||
private static int poolSize = 50;
|
private static int poolSize = 50;
|
||||||
private static int threadCount = 50;
|
private static int threadCount = 50;
|
||||||
private static int sleep = 1000;
|
private static int sleep = 0;
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String host = null;
|
String host = null;
|
||||||
|
@ -98,7 +97,8 @@ public class ConnectionPoolDemo {
|
||||||
executor.execute(new InsertTask(dataSource, dbName, tableSize, batchSize));
|
executor.execute(new InsertTask(dataSource, dbName, tableSize, batchSize));
|
||||||
// sleep few seconds
|
// sleep few seconds
|
||||||
try {
|
try {
|
||||||
TimeUnit.MILLISECONDS.sleep(sleep);
|
if (sleep > 0)
|
||||||
|
TimeUnit.MILLISECONDS.sleep(sleep);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue