*
* @return time taken
* @throws SQLException
*/
private long singleDBPool() throws SQLException{
DBPoolDataSource ds = new DBPoolDataSource();
ds.setName("db-pool-ds");
ds.setDriverClassName("com.jolbox.bonecp.MockJDBCDriver");
ds.setUrl(url);
ds.setUser(username);
ds.setPassword(password);
ds.setMinPool(pool_size);
ds.setMaxPool(pool_size);
ds.setMaxSize(pool_size);
long start = System.currentTimeMillis();
for (int i=0; i < MAX_CONNECTIONS; i++){
Connection conn = ds.getConnection();
conn.close();
}
long end = (System.currentTimeMillis() - start);
ds.release();
return end;
}