}
protected boolean run = true;
- protected long sleep = Long.getLong("sleep", 10);
- protected long complete = Long.getLong("complete",20000);
+ protected long sleep = Long.getLong("sleep", 10).longValue();
+ protected long complete = Long.getLong("complete",20000).longValue();
protected boolean printthread = Boolean.getBoolean("printthread");
CountDownLatch latch = null;
protected void printThreadResults(TestThread[] threads, String name, int active, int expected) {
long minfetch = Long.MAX_VALUE, maxfetch = Long.MIN_VALUE, totalfetch = 0;
- long maxwait = 0, minwait = Long.MAX_VALUE, averagewait = 0, totalwait = 0;
- float avgfetch = 0;
+ long maxwait = 0, minwait = Long.MAX_VALUE, totalwait = 0;
for (int i=0; i<threads.length; i++) {
TestThread t = threads[i];
totalfetch += t.nroffetch;
this.run = false;
long delta = System.currentTimeMillis() - start;
printThreadResults(threads,"testDBCPThreads20Connections10",Driver.connectCount.get(),10);
+ System.out.println("Test completed in: " + delta + "ms.");
tearDown();
}
this.run = false;
long delta = System.currentTimeMillis() - start;
printThreadResults(threads,"testPoolThreads20Connections10",Driver.connectCount.get(),10);
+ System.out.println("Test completed in: " + delta + "ms.");
tearDown();
}
this.run = false;
long delta = System.currentTimeMillis() - start;
printThreadResults(threads,"testPoolThreads20Connections10Fair",Driver.connectCount.get(),10);
+ System.out.println("Test completed in: " + delta + "ms.");
tearDown();
}
this.run = false;
long delta = System.currentTimeMillis() - start;
printThreadResults(threads,"testPoolThreads20Connections10FairAsync",Driver.connectCount.get(),10);
+ System.out.println("Test completed in: " + delta + "ms.");
tearDown();
}