Package org.apache.commons.lang.time

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


    Get get = null;
    Scan scan = null;
    ResultScanner rs = null;
    StopWatch stopWatch = new StopWatch();
    for (HColumnDescriptor column : tableDesc.getColumnFamilies()) {
      stopWatch.reset();
      startKey = region.getStartKey();
      // Can't do a get on empty start row so do a Scan of first element if any instead.
      if (startKey.length > 0) {
        get = new Get(startKey);
        get.addFamily(column.getName());
View Full Code Here


      byte[] startKey = null;
      Scan scan = null;
      StopWatch stopWatch = new StopWatch();
      // monitor one region on every region server
      for (Map.Entry<String, List<HRegionInfo>> entry : rsAndRMap.entrySet()) {
        stopWatch.reset();
        serverName = entry.getKey();
        // always get the first region
        region = entry.getValue().get(0);
        try {
          tableName = region.getTable().getNameAsString();
View Full Code Here

        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

        watch.stop();
        System.out.println("[" + ClassUtils.getShortClassName(this.getClass())
                + "#testMassStoreUpdateAutomatic] 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

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.