Package org.hsqldb.lib

Examples of org.hsqldb.lib.StopWatch.zero()


        // do the test loop forever
        for (int i = 0; i < 1; i++) {
            println("---------------------------------------");

            // inserts
            sw.zero();
            insertStmnt.executeBatch();
            printCommandStats(sw, "inserts", rows);

            ResultSet    generated = insertStmnt.getGeneratedKeys();
            StringBuffer sb        = new StringBuffer();
View Full Code Here


            System.out.println(sb.toString());
            printCommandStats(sw, "generated reads", genCount);

            // updates
            sw.zero();
            int[] updateCounts = updateStmnt.executeBatch();
            printCommandStats(sw, "updates", updateCounts.length);

            // selects
            sw.zero();
View Full Code Here

            sw.zero();
            int[] updateCounts = updateStmnt.executeBatch();
            printCommandStats(sw, "updates", updateCounts.length);

            // selects
            sw.zero();

//            selectStmnt.executeBatch();
//            printCommandStats(sw, "selects");
            // deletes
            sw.zero();
View Full Code Here

            sw.zero();

//            selectStmnt.executeBatch();
//            printCommandStats(sw, "selects");
            // deletes
            sw.zero();
            updateCounts = deleteStmnt.executeBatch();
            printCommandStats(sw, "deletes", updateCounts.length);

            // calls
            sw.zero();
View Full Code Here

            sw.zero();
            updateCounts = deleteStmnt.executeBatch();
            printCommandStats(sw, "deletes", updateCounts.length);

            // calls
            sw.zero();

//            callStmnt.executeBatch();
//            printCommandStats(sw, "calls  ");
        }
    }
View Full Code Here

            sw.stop();
            System.out.println(sw.elapsedTimeToMessage("Time for inserts"));

            ps = connection.prepareStatement(dml1);

            sw.zero();
            sw.start();

            for (int i = 100; i < 200; i++) {
                reader = dataClob.getCharacterStream();
View Full Code Here

            sw.stop();
            System.out.println(sw.elapsedTimeToMessage("Time for inserts"));

            ps = connection.prepareStatement(dml1);

            sw.zero();
            sw.start();

            for (int i = 10; i < 20; i++) {
                ps.setString(1, "test-id-1" + i);
                ps.setLong(2, 23456789123456L + i);
View Full Code Here

            "ALTER TABLE test add constraint c1 FOREIGN KEY (zip) REFERENCES zip(zip);";
        String filler = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ";

        try {
            System.out.println("Connecting");
            sw.zero();

            cConnection = null;
            sStatement  = null;
            cConnection = DriverManager.getConnection(url, user, password);
View Full Code Here

            cConnection = null;
            sStatement  = null;
            cConnection = DriverManager.getConnection(url, user, password);

            System.out.println("connected: " + sw.elapsedTime());
            sw.zero();

            sStatement = cConnection.createStatement();

            java.util.Random randomgen = new java.util.Random();
View Full Code Here

//            sStatement.execute("DROP TABLE temptest;");
//            sStatement.execute(ddl7);
            System.out.println("Total insert: " + i);
            System.out.println("Insert time: " + sw.elapsedTime() + " rps: "
                               + (i * 1000 / sw.elapsedTime()));
            sw.zero();

            if (!network) {
                sStatement.execute("SHUTDOWN");
            }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.