Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.StopWatch.reset()


        watch.stop();
        System.out.println("[" + ClassUtils.getShortClassName(this.getClass())
                + "#testMassStoreUpdateAutomatic] Time to query "+movieCount+" m:n objects=" + watch.getTime());
        testPeriod += watch.getTime();

        watch.reset();
        watch.start();
        Query queryActor = queryActor(postfix);
        Collection resultActor = broker.getCollectionByQuery(queryActor);
        assertEquals(actorCount + 1, resultActor.size());
        watch.stop();
View Full Code Here


        assertEquals(actorCount + movieCount + 1, resultRole.size());

        //*****************************
        // update movie
        movie.setActors(new ArrayList());
        watch.reset();
        watch.start();
        broker.beginTransaction();
        broker.store(movie);
        broker.commitTransaction();
        watch.stop();
View Full Code Here

        assertEquals(0, movie.getActors().size());

        //*****************************
        // remove actor
        movie.setActors(new ArrayList());
        watch.reset();
        watch.start();
        broker.beginTransaction();
        broker.delete(actor);
        broker.commitTransaction();
        watch.stop();
View Full Code Here

        watch.stop();
        System.out.println("[" + ClassUtils.getShortClassName(this.getClass())
                + "#testMassStoreUpdateLinking] Time to store "+(actorCount + movieCount)+" m:n objects=" + watch.getTime());
        testPeriod += watch.getTime();

        watch.reset();
        watch.start();
        Query queryMovie = queryMovie(postfix);
        Collection resultMovie = broker.getCollectionByQuery(queryMovie);
        assertEquals(movieCount + 1, resultMovie.size());
        watch.stop();
View Full Code Here

        watch.stop();
        System.out.println("[" + ClassUtils.getShortClassName(this.getClass())
                + "#testMassStoreUpdateLinking] Time to query "+movieCount+" m:n objects=" + watch.getTime());
        testPeriod += watch.getTime();

        watch.reset();
        watch.start();
        Query queryActor = queryActor(postfix);
        Collection resultActor = broker.getCollectionByQuery(queryActor);
        assertEquals(actorCount + 1, resultActor.size());
        watch.stop();
View Full Code Here

        assertEquals(actorCount + movieCount + 1, resultRole.size());

        //*****************************
        // update movie
        movie.setActors(new ArrayList());
        watch.reset();
        watch.start();
        broker.beginTransaction();
        broker.serviceBrokerHelper().unlink(movie);
        broker.store(movie);
        broker.serviceBrokerHelper().link(movie, false);
View Full Code Here

        assertEquals(0, movie.getActors().size());

        //*****************************
        // remove actor
        movie.setActors(new ArrayList());
        watch.reset();
        watch.start();
        broker.beginTransaction();
        broker.delete(actor);
        broker.commitTransaction();
        watch.stop();
View Full Code Here

        assertEquals(10, result.size());

        crit = new Criteria();
        crit.addEqualTo("name", name);
        q = QueryFactory.newQuery(Gourmet.class, crit);
        watch.reset();
        watch.start();
        c = broker.getCollectionByQuery(q);
        watch.stop();
        System.out.println("# Query all " + objCount + " objects take " + watch.getTime() + " ms");
        assertNotNull(c);
View Full Code Here

        stopWatch.stop();
        System.out.println("puts duration=" + stopWatch.getTime() + ", " + em.getTotalOpStats().getPuts() + " items put.");

        Thread.sleep(5000);

        stopWatch.reset();
        stopWatch.start();
        Query query = em.createQuery("select o from PerformanceTestObject o");
        List<PerformanceTestObject> resultList = query.getResultList();
        System.out.println("iterating result list...");
        int i = 0;
View Full Code Here

            }
        }
        stopWatch.stop();
        System.out.println("query ALL duration=" + stopWatch.getTime() + ", " + em.getTotalOpStats().getGets() + " items got.");

        stopWatch.reset();
        stopWatch.start();
        System.out.println("Deleting ALL...");
        for (PerformanceTestObject performanceTestObject : resultList) {
            lastFuture = em.removeAsync(o);
        }
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.