Package org.modeshape.common.statistic

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


            for (int j = 0; j != MANY_NODES_COUNT; ++j) {
                node.addNode("childNode");
            }
            session.save();
            if (i > 2) {
                sw.stop();
            }

            // Now add another node ...
            node.addNode("oneMore");
            session.save();
View Full Code Here


            for (int j = 0; j != count; ++j) {
                node.addNode("childNode" + j);
            }
            session.save();
            if (i > 2) {
                sw.stop();
            }

            // Now add another node ...
            node.addNode("oneMore");
            session.save();
View Full Code Here

        int numNodesEach = 0;
        for (int i = 0; i != samples; ++i) {
            System.out.print(".");
            sw.start();
            numNodesEach = createSubgraph(session, node, depth, numberOfChildrenPerNode, numberOfPropertiesPerNode, useSns, 1);
            sw.stop();
            session.save();
        }

        // session.getRootNode().getNode("testArea").remove();
        // session.save();
View Full Code Here

        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) {
            System.out.println("Find " + randomNode.getPath() + ": " + sw.getTotalDuration());
        }
    }
View Full Code Here

        for (int i = 0; i < insertBatches; i++) {
            // reload the parent in the session after it was saved
            parent = session.getNode("/testRoot");
            createSubgraph(session, parent, 1, insertBatchSize, propertiesPerChild, true, 1);
        }
        globalSw.stop();
        if (print) {
            System.out.println("Inserted " + initialNodeCount + " nodes in: " + globalSw.getSimpleStatistics());
        }
        globalSw.reset();
        globalSw.start();
View Full Code Here

            while (nodeIterator.hasNext()) {
                final Node child = nodeIterator.nextNode();
                child.getPath();
                child.getName();
            }
            readSW.stop();
            if (print) {
                System.out.println("Time to read batch " + i + " : " + readSW.getSimpleStatistics());
            }
            readSW.reset();
View Full Code Here

        session.save();
        Stopwatch sw = new Stopwatch();
        sw.start();
        int totalNumberOfNodes = createSubgraphBreadthFirst(1, nodeType, "/testRoot", totalNodeCount, childrenPerNode,
                                                            propertiesPerNode, true);
        sw.stop();
        System.out.println("Total time to insert " + totalNumberOfNodes + " nodes in batches of " + childrenPerNode + ": "
                           + sw.getSimpleStatistics());
    }

    @Test
View Full Code Here

        session.save();
        Stopwatch sw = new Stopwatch();
        sw.start();
        int totalNumberOfNodes = createSubgraphBreadthFirst(1, nodeType, "/testRoot", totalNodeCount, childrenPerNode,
                                                            propertiesPerNode, false);
        sw.stop();
        System.out.println("Total time to insert " + totalNumberOfNodes + " nodes in batches of " + childrenPerNode + ": "
                           + sw.getSimpleStatistics());
    }

    @Test
View Full Code Here

        session.save();
        Stopwatch sw = new Stopwatch();
        sw.start();
        int totalNumberOfNodes = createSubgraphDepthFirst(nodeType, "/testRoot", totalNodeCount, childrenPerNode,
                                                          propertiesPerNode, true);
        sw.stop();
        System.out.println("Total time to insert " + totalNumberOfNodes + " nodes in batches of " + childrenPerNode + ": "
                           + sw.getSimpleStatistics());
    }

    @Test
View Full Code Here

        session.save();
        Stopwatch sw = new Stopwatch();
        sw.start();
        int totalNumberOfNodes = createSubgraphDepthFirst(nodeType, "/testRoot", totalNodeCount, childrenPerNode,
                                                          propertiesPerNode, false);
        sw.stop();
        System.out.println("Total time to insert " + totalNumberOfNodes + " nodes in batches of " + childrenPerNode + ": "
                           + sw.getSimpleStatistics());
    }

    /**
 
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.