Package org.modeshape.common.statistic

Examples of org.modeshape.common.statistic.Stopwatch.reset()


        // Now try getting a node at one level down ...
        String name = "childNode";
        int index = numberOfChildrenPerNode / 2;
        String path = useSns ? (name + "[" + index + "]") : (name + index);
        sw.reset();
        sw.start();
        Node randomNode = node.getNode(path);
        sw.stop();
        assertThat(randomNode, is(notNullValue()));
        if (print) {
View Full Code Here


        }
        globalSw.stop();
        if (print) {
            System.out.println("Inserted " + initialNodeCount + " nodes in: " + globalSw.getSimpleStatistics());
        }
        globalSw.reset();
        globalSw.start();
        Stopwatch readSW = new Stopwatch();
        // add additional batches of nodes while reading the paths after each batch of children was added
        int batchCount = 36;
        int batchSize = 1000;
View Full Code Here

            }
            readSW.stop();
            if (print) {
                System.out.println("Time to read batch " + i + " : " + readSW.getSimpleStatistics());
            }
            readSW.reset();

            // change the parent & save so that it's flushed from the cache
            session.getNode("/testRoot").setProperty("test", "test2");
            session.save();
View Full Code Here

        String firstChildPath;
        Stopwatch sw = new Stopwatch();
        sw.start();
        int level = 1;
        do {
            sw.reset();
            sw.start();
            firstChildPath = null;
            Node parentNode = session.getNode(parentAbsPath);

            for (int i = 0; i != numberOfChildrenPerNode; ++i) {
View Full Code Here

        // Now try getting a node at one level down ...
        String name = "childNode";
        int index = numberOfChildrenPerNode / 2;
        String path = useSns ? (name + "[" + index + "]") : (name + index);
        sw.reset();
        sw.start();
        Node randomNode = node.getNode(path);
        sw.stop();
        assertThat(randomNode, is(notNullValue()));
        if (print) {
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.