Search in sources :

Example 1 with ProxoolDataSource

use of org.logicalcobwebs.proxool.ProxoolDataSource in project druid by alibaba.

the class Case0 method f_test_proxool.

public void f_test_proxool() throws Exception {
    ProxoolDataSource dataSource = new ProxoolDataSource();
    // dataSource.(10);
    // dataSource.setMaxActive(50);
    dataSource.setMinimumConnectionCount(minIdle);
    dataSource.setMaximumConnectionCount(maxIdle);
    dataSource.setDriver(driverClass);
    dataSource.setDriverUrl(jdbcUrl);
    // dataSource.setPoolPreparedStatements(true);
    // dataSource.setMaxOpenPreparedStatements(100);
    dataSource.setUser(user);
    dataSource.setPassword(password);
    for (int i = 0; i < LOOP_COUNT; ++i) {
        p0(dataSource, "proxool");
    }
    System.out.println();
}
Also used : ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource)

Example 2 with ProxoolDataSource

use of org.logicalcobwebs.proxool.ProxoolDataSource in project druid by alibaba.

the class Case1 method test_proxool.

public void test_proxool() throws Exception {
    ProxoolDataSource dataSource = new ProxoolDataSource();
    // dataSource.(10);
    // dataSource.setMaxActive(50);
    dataSource.setMinimumConnectionCount(minPoolSize);
    dataSource.setMaximumConnectionCount(maxPoolSize);
    dataSource.setDriver(driverClass);
    dataSource.setDriverUrl(jdbcUrl);
    // dataSource.setPoolPreparedStatements(true);
    // dataSource.setMaxOpenPreparedStatements(100);
    dataSource.setUser(user);
    dataSource.setPassword(password);
    for (int i = 0; i < loopCount; ++i) {
        p0(dataSource, "proxool", threadCount);
    }
    System.out.println();
}
Also used : ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource)

Example 3 with ProxoolDataSource

use of org.logicalcobwebs.proxool.ProxoolDataSource in project druid by alibaba.

the class TestLRU method f_test_proxool.

public void f_test_proxool() throws Exception {
    ProxoolDataSource ds = new ProxoolDataSource();
    ds.setDriver("com.alibaba.druid.mock.MockDriver");
    ds.setDriverUrl("jdbc:mock:test");
    ds.setMaximumConnectionCount(10);
    ds.setMinimumConnectionCount(0);
    ds.setUser("user");
    ds.setPassword("password");
    for (int i = 0; i < 10; ++i) {
        f(ds, 5);
        System.out.println("--------------------------------------------");
    }
}
Also used : ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource)

Example 4 with ProxoolDataSource

use of org.logicalcobwebs.proxool.ProxoolDataSource in project druid by alibaba.

the class TestPSCache method f_test_proxool.

public void f_test_proxool() throws Exception {
    ProxoolDataSource ds = new ProxoolDataSource();
    ds.setDriver("com.alibaba.druid.mock.MockDriver");
    ds.setDriverUrl("jdbc:mock:test");
    ds.setMaximumConnectionCount(10);
    ds.setMinimumConnectionCount(0);
    ds.setUser("user");
    ds.setPassword("password");
    for (int i = 0; i < 10; ++i) {
        f(ds, 5);
        System.out.println("--------------------------------------------");
    }
}
Also used : ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource)

Example 5 with ProxoolDataSource

use of org.logicalcobwebs.proxool.ProxoolDataSource in project druid by alibaba.

the class Case4 method test_proxool.

public void test_proxool() throws Exception {
    ProxoolDataSource dataSource = new ProxoolDataSource();
    // dataSource.(10);
    // dataSource.setMaxActive(50);
    dataSource.setMinimumConnectionCount(minPoolSize);
    dataSource.setMaximumConnectionCount(maxPoolSize);
    dataSource.setDriver(driverClass);
    dataSource.setDriverUrl(jdbcUrl);
    dataSource.setUser(user);
    dataSource.setPassword(password);
    for (int i = 0; i < loopCount; ++i) {
        p0(dataSource, "proxool", threadCount);
    }
    System.out.println();
}
Also used : ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource)

Aggregations

ProxoolDataSource (org.logicalcobwebs.proxool.ProxoolDataSource)5