Commit ab3cf260 authored by Andre Freyssinet's avatar Andre Freyssinet
Browse files

Adds statistics about pool use.

parent 1249d529
......@@ -81,6 +81,7 @@ public class Test1 extends TestCase {
AdminModule.disconnect();
long start = System.currentTimeMillis();
for (int i=0; i<15; i++) {
new Thread() {
public void run() {
......@@ -102,6 +103,9 @@ public class Test1 extends TestCase {
} catch (InterruptedException exc) {}
}
}
long end = System.currentTimeMillis();
System.out.println("dt=" + (end-start));
System.out.println(((PooledConnectionFactory) pcf).getStatistics());
} catch (Throwable exc) {
exc.printStackTrace();
error(exc);
......
......@@ -107,6 +107,7 @@ public class Test2 extends TestCase {
} catch (InterruptedException exc) {}
}
}
System.out.println(((PooledConnectionFactory) pcf).getStatistics());
} catch (Throwable exc) {
exc.printStackTrace();
error(exc);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment