Package org.jboss.dna.common.statistic

Examples of org.jboss.dna.common.statistic.Stopwatch.stop()


            // Get the root ...
            sw.start();
            Node<JcrNodePayload, JcrPropertyPayload> root = cache.findNode(null, path("/"));
            root.getPath();
            root.getPayload(); // forces a load
            sw.stop();

            // Walk the infos for nodes under the root (this is recursive) ...
            walkInfosForNodesUnder(root, sw);
            System.out.println("Statistics for walking nodes using SessionCache: " + sw.getSimpleStatistics() + "  -> "
                               + super.numberOfConnections);
View Full Code Here


            // Get the root ...
            sw.start();
            Node<JcrNodePayload, JcrPropertyPayload> root = cache.findNode(null, path("/"));
            root.getPath();
            root.getPayload(); // forces a load
            sw.stop();

            // Walk the infos for nodes under the root (this is recursive) ...
            walkInfosForNodesUnder(root, sw);
            System.out.println("Statistics for walking nodes using SessionCache: " + sw.getSimpleStatistics() + "  -> "
                               + super.numberOfConnections);
View Full Code Here

            // Get the root ...
            sw.start();
            Node<JcrNodePayload, JcrPropertyPayload> root = cache.findNode(null, path("/"));
            root.getPath();
            root.getPayload(); // forces a load
            sw.stop();

            // Walk the infos for nodes under the root (this is recursive) ...
            walkInfosForNodesUnder(root, sw);
            System.out.println("Statistics for walking nodes using SessionCache: " + sw.getSimpleStatistics() + "  -> "
                               + super.numberOfConnections);
View Full Code Here

            }
        }

        if (logger.isTraceEnabled()) {
            assert sw != null;
            sw.stop();
            logger.trace(getClass().getSimpleName() + ".execute(...) took " + sw.getTotalDuration());
        }
    }

    /**
 
View Full Code Here

                }
            }
        }
        if (logger.isTraceEnabled()) {
            assert sw != null;
            sw.stop();
            logger.trace("MapRepositoryConnection.execute(...) took " + sw.getTotalDuration());
        }
    }

    /**
 
View Full Code Here

                lock.unlock();
            }
        }
        if (logger.isTraceEnabled()) {
            assert sw != null;
            sw.stop();
            logger.trace("MapRepositoryConnection.execute(...) took " + sw.getTotalDuration());
        }
    }

    /**
 
View Full Code Here

            batch = graph.batch();
            totalNumberCreated += createChildren(batch, initialPath, "secondBranch", 2, numberOfPropertiesPerNode, 2, null);
            Stopwatch sw = new Stopwatch();
            sw.start();
            batch.execute();
            sw.stop();
            System.out.println("     final " + getTotalAndAverageDuration(sw, totalNumberCreated));
            assertThat(totalNumberCreated, is(totalNumber + calculateTotalNumberOfNodesInTree(2, 2, false)));
        }
        return (int)totalNumberCreated;
View Full Code Here

            // Prevent the resolving of DTD entities into fully-qualified URIS
            XmlSequencer.setFeature(reader, XmlSequencer.RESOLVE_DTD_URIS_FEATURE, false);
            reader.parse(new InputSource(stream));
        } finally {
            if (stream != null) stream.close();
            sw.stop();
            System.out.println("Parsing: " + sw);
        }
        pathsInCreationOrder = new LinkedList<Path>(output.getOrderOfCreation());
    }
}
View Full Code Here

        Stopwatch sw = new Stopwatch();
        sw.start();
        new Thread(new CountDownRunnable(latch, 100L)).start();
        request.await(); // this blocks until the latch reaches 0
        assertThat(latch.getCount(), is(0L));
        sw.stop();
        assertThat(sw.getTotalDuration().getDurationInMilliseconds().intValue() >= 250, is(true));
    }

    protected static class CountDownRunnable implements Runnable {
        private final CountDownLatch latch;
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.