From: James Moger Date: Mon, 15 Aug 2011 22:06:15 +0000 (-0400) Subject: Prepare 0.6.6 release. X-Git-Tag: v0.6.6^0 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8193609af00aa9529ed7b3090b5739c4e95b12c4;p=iciql.git Prepare 0.6.6 release. --- diff --git a/api/v5.xml b/api/v5.xml new file mode 100644 index 0000000..acb0321 --- /dev/null +++ b/api/v5.xml @@ -0,0 +1,5781 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.xml b/build.xml index 19da799..5ac4352 100644 --- a/build.xml +++ b/build.xml @@ -182,7 +182,7 @@ - + diff --git a/docs/02_usage.mkd b/docs/02_usage.mkd index fe4801b..31dbfb6 100644 --- a/docs/02_usage.mkd +++ b/docs/02_usage.mkd @@ -67,7 +67,7 @@ JdbcUtils.closeSilently(rs, true); ### Natural Syntax -**work-in-progress** +work-in-progress The original JaQu source offers partial support for Java expressions in *where* clauses. diff --git a/src/com/iciql/Constants.java b/src/com/iciql/Constants.java index 1eeef47..bf6a5d0 100644 --- a/src/com/iciql/Constants.java +++ b/src/com/iciql/Constants.java @@ -25,14 +25,14 @@ public class Constants { // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String VERSION = "0.6.6-SNAPSHOT"; + public static final String VERSION = "0.6.6"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String VERSION_DATE = "PENDING"; + public static final String VERSION_DATE = "2011-08-15"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String API_CURRENT = "4"; + public static final String API_CURRENT = "5"; } diff --git a/tests/com/iciql/test/IciqlSuite.java b/tests/com/iciql/test/IciqlSuite.java index 33d8f31..b91f3a4 100644 --- a/tests/com/iciql/test/IciqlSuite.java +++ b/tests/com/iciql/test/IciqlSuite.java @@ -61,8 +61,7 @@ import com.iciql.util.StringUtils; RuntimeQueryTest.class, SamplesTest.class, UpdateTest.class, UUIDTest.class }) public class IciqlSuite { - private static final TestDb[] TEST_DBS = { - new TestDb("H2", "jdbc:h2:mem:db{0,number,000}"), + private static final TestDb[] TEST_DBS = { new TestDb("H2", "jdbc:h2:mem:db{0,number,000}"), new TestDb("HSQL", "jdbc:hsqldb:mem:db{0,number,000}"), new TestDb("Derby", "jdbc:derby:memory:db{0,number,000};create=true") }; @@ -187,7 +186,7 @@ public class IciqlSuite { if (StringUtils.isNullOrEmpty(params.sqlStatementsFile)) { statementWriter = null; } else { - statementWriter = new FileWriter(params.sqlStatementsFile); + statementWriter = new FileWriter(params.sqlStatementsFile); } StatementListener statementListener = new StatementListener() { @Override @@ -202,10 +201,9 @@ public class IciqlSuite { e.printStackTrace(); } } - }; + }; StatementLogger.registerListener(statementListener); - - + SuiteClasses suiteClasses = IciqlSuite.class.getAnnotation(SuiteClasses.class); long quickestDatabase = Long.MAX_VALUE; String dividerMajor = buildDivider('*', 70); @@ -223,35 +221,46 @@ public class IciqlSuite { showProperty("java.vm.name"); showProperty("os.name"); showProperty("os.version"); - showProperty("os.arch"); + showProperty("os.arch"); showProperty("available processors", "" + Runtime.getRuntime().availableProcessors()); - showProperty("available memory", MessageFormat.format("{0,number,#.0} GB", ((double) Runtime.getRuntime().maxMemory())/(1024*1024))); + showProperty( + "available memory", + MessageFormat.format("{0,number,#.0} GB", ((double) Runtime.getRuntime().maxMemory()) + / (1024 * 1024))); out.println(); // Test a database + long lastCount = 0; for (TestDb testDb : TEST_DBS) { out.println(dividerMinor); out.println("Testing " + testDb.name + " " + testDb.getVersion()); out.println(dividerMinor); - + // inject a database section delimiter in the statement log if (statementWriter != null) { statementWriter.append("\n\n"); statementWriter.append("# ").append(dividerMinor).append('\n'); - statementWriter.append("# ").append("Testing " + testDb.name + " " + testDb.getVersion()).append('\n'); + statementWriter.append("# ").append("Testing " + testDb.name + " " + testDb.getVersion()) + .append('\n'); statementWriter.append("# ").append(dividerMinor).append('\n'); statementWriter.append("\n\n"); } - + System.setProperty("iciql.url", testDb.url); Result result = JUnitCore.runClasses(suiteClasses.value()); testDb.runtime = result.getRunTime(); if (testDb.runtime < quickestDatabase) { quickestDatabase = testDb.runtime; } - out.println(MessageFormat.format("{0} tests: {1} failures, {2} ignores in {3,number,0.000} secs", + testDb.statements = StatementLogger.getTotalCount() - lastCount; + // reset total count for next database + lastCount = StatementLogger.getTotalCount(); + + out.println(MessageFormat.format( + "{0} tests ({1} failures, {2} ignores) {3} statements in {4,number,0.000} secs", result.getRunCount(), result.getFailureCount(), result.getIgnoreCount(), - result.getRunTime() / 1000f)); + testDb.statements, result.getRunTime() / 1000f)); + if (result.getFailureCount() == 0) { out.println(); } else { @@ -282,9 +291,11 @@ public class IciqlSuite { } }); for (TestDb testDb : dbs) { - out.println(MessageFormat.format("{0} {1} {2,number,0.000} secs ({3,number,#.0}x)", + out.println(MessageFormat.format( + "{0} {1} {2,number,0.0} stats/sec {3,number,0.000} secs ({4,number,#.0}x)", StringUtils.pad(testDb.name, 6, " ", true), - StringUtils.pad(testDb.getVersion(), 22, " ", true), testDb.runtime / 1000f, + StringUtils.pad(testDb.getVersion(), 22, " ", true), + ((double) testDb.statements)/ (testDb.runtime/1000d), testDb.runtime / 1000f, ((double) testDb.runtime) / quickestDatabase)); } @@ -337,6 +348,7 @@ public class IciqlSuite { final String url; String version; long runtime; + long statements; TestDb(String name, String url) { this.name = name; @@ -366,7 +378,7 @@ public class IciqlSuite { @Parameter(names = { "--dbFile" }, description = "Database performance results text file", required = false) public String dbPerformanceFile; - + @Parameter(names = { "--sqlFile" }, description = "SQL statements log file", required = false) public String sqlStatementsFile; }