Package org.hsqldb.lib

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


            dataSource.setDatabase(url + filepath);

            cConnection = dataSource.getConnection(user, password);

            System.out.println("connection time -- " + sw.elapsedTime());
            sw.zero();

            sStatement = cConnection.createStatement();

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


            if (multikeytable) {
                fillUpMultiTable(filler, randomgen);
            }

            sw.zero();

            if (shutdown) {
                sStatement.execute("SHUTDOWN");

                long time = sw.elapsedTime();
View Full Code Here

            long time = sw.elapsedTime();

            storeResult("reopen", 0, time, 0);
            System.out.println("database reopen time -- " + time + " ms");
            sw.zero();

            sStatement = cConnection.createStatement();

//            sStatement.execute("SET WRITE_DELAY " + writeDelay);
            checkSelects();
View Full Code Here

            sStatement = cConnection.createStatement();

//            sStatement.execute("SET WRITE_DELAY " + writeDelay);
            checkSelects();
            checkUpdates();
            sw.zero();

            if (shutdown) {
                sStatement.execute("SHUTDOWN");

                time = sw.elapsedTime();
View Full Code Here

            XResultSet rs;

            cConnection = drv.connect(url,info);

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

            sStatement = cConnection.createStatement();

            sStatement.execute("SET WRITE_DELAY " + writeDelay);
View Full Code Here

            rs.next();
            System.out.println("Row Count: " + row.getInt(1));
            System.out.println("Time to count: " + sw.elapsedTime());

            // use index on zip
            sw.zero();
            sStatement.execute("SELECT count(*) from TEST where zip > -1");

            rs = mrs.getResultSet();

            rs.next();
View Full Code Here

            System.out.println("Row Count: " + row.getInt(1));
            System.out.println("Time to count: " + sw.elapsedTime());
            checkSelects();
            checkUpdates();
            checkSelects();
            sw.zero();
            sStatement.execute("SELECT count(*) from TEST where zip > -1");

            rs = mrs.getResultSet();

            rs.next();
View Full Code Here

            rs = mrs.getResultSet();

            rs.next();
            System.out.println("Row Count: " + row.getInt(1));
            System.out.println("Time to count: " + sw.elapsedTime());
            sw.zero();

            if (shutdown) {
                sStatement.execute("SHUTDOWN");
                System.out.println("Shutdown Time: " + sw.elapsedTime());
            }
View Full Code Here

        }

        System.out.println("Select random zip " + i + " rows : "
                           + sw.elapsedTime() + " rps: "
                           + (i * 1000 / (sw.elapsedTime() + 1)));
        sw.zero();

        try {
            XPreparedStatement ps = cConnection.prepareStatement(
                "SELECT firstname,lastname,zip,filler FROM test WHERE id = ?");
            XParameters para = (XParameters)UnoRuntime.queryInterface(XParameters.class,ps);
View Full Code Here

        }

        System.out.println("Select random id " + i + " rows : "
                           + sw.elapsedTime() + " rps: "
                           + (i * 1000 / (sw.elapsedTime() + 1)));
        sw.zero();

        try {
            XPreparedStatement ps = cConnection.prepareStatement(
                "SELECT zip FROM zip WHERE zip = ?");
            XParameters para = (XParameters)UnoRuntime.queryInterface(XParameters.class,ps);
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.