mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
change benchmark testcase
This commit is contained in:
@@ -49,14 +49,14 @@ public class Case0 extends TestCase {
|
||||
public final int COUNT = 1000 * 1000 * 1;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
jdbcUrl = "jdbc:fake:dragoon_v25masterdb";
|
||||
user = "dragoon25";
|
||||
password = "dragoon25";
|
||||
driverClass = "com.alibaba.druid.mock.MockDriver";
|
||||
// jdbcUrl = "jdbc:fake:dragoon_v25masterdb";
|
||||
// user = "dragoon25";
|
||||
// password = "dragoon25";
|
||||
// driverClass = "com.alibaba.druid.mock.MockDriver";
|
||||
|
||||
// jdbcUrl = "jdbc:mysql://10.20.159.104:3306/masterdb";
|
||||
// user = "dragoon";
|
||||
// password = "dragoon";
|
||||
jdbcUrl = "jdbc:mysql://10.20.159.104:3306/masterdb";
|
||||
user = "dragoon";
|
||||
password = "dragoon";
|
||||
}
|
||||
|
||||
public void test_0() throws Exception {
|
||||
@@ -134,10 +134,10 @@ public class Case0 extends TestCase {
|
||||
|
||||
for (int i = 0; i < COUNT; ++i) {
|
||||
Connection conn = dataSource.getConnection();
|
||||
Statement stmt = conn.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT 1");
|
||||
rs.close();
|
||||
stmt.close();
|
||||
// Statement stmt = conn.createStatement();
|
||||
// ResultSet rs = stmt.executeQuery("SELECT 1");
|
||||
// rs.close();
|
||||
// stmt.close();
|
||||
conn.close();
|
||||
}
|
||||
long millis = System.currentTimeMillis() - startMillis;
|
||||
|
||||
Reference in New Issue
Block a user