提交 bad2c71f authored 作者: Thomas Mueller's avatar Thomas Mueller

Benchmark: the number of executed statements was incorrect.

上级 c7038f81
......@@ -317,7 +317,9 @@ class Database {
void update(PreparedStatement prep, String trace) throws SQLException {
test.trace(trace);
prep.executeUpdate();
executedStatements++;
if (test.collect) {
executedStatements++;
}
}
/**
......@@ -328,7 +330,9 @@ class Database {
void update(String sql) throws SQLException {
sql = getSQL(sql);
if (sql.trim().length() > 0) {
executedStatements++;
if (test.collect) {
executedStatements++;
}
stat.execute(sql);
} else {
System.out.println("?");
......@@ -414,7 +418,9 @@ class Database {
// if(time > 100) {
// System.out.println("time="+time);
// }
executedStatements++;
if (test.collect) {
executedStatements++;
}
return rs;
}
......
......@@ -89,8 +89,6 @@ public class TestPerformance {
exit = true;
}
}
openResults(init);
Properties prop = new Properties();
InputStream in = getClass().getResourceAsStream("test.properties");
prop.load(in);
......@@ -129,6 +127,7 @@ public class TestPerformance {
Statement stat = null;
PrintWriter writer = null;
try {
openResults(init);
conn = getResultConnection();
stat = conn.createStatement();
prep = conn
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论