Package org.jboss.cache.profiling.testinternals

Examples of org.jboss.cache.profiling.testinternals.TaskRunner.execute()


      long startTime = System.currentTimeMillis();
      TaskRunner exec = new TaskRunner(NUM_THREADS);
      log.warn("Starting warmup");
      // creates all the Fqns since this can be expensive and we don't really want to measure this (for now)
      for (final Fqn f : fqns) {
         exec.execute(new Runnable() {
            public void run() {
               // this will create the necessary nodes.
               cache.put(f, Collections.emptyMap());
            }
         });
View Full Code Here


         });
      }

      // loop through WARMUP_LOOPS gets and puts for JVM optimisation
      for (int i = 0; i < WARMUP_LOOPS; i++) {
         exec.execute(new Runnable() {
            public void run() {
               Fqn f = Generator.getRandomElement(fqns);
               cache.get(f, "");
               cache.put(f, "k", "v");
               cache.remove(f, "k");
View Full Code Here

               r = new Remover(i, durationRemoves);
               break;
         }
         if (i % print == 0)
            log.warn("processing iteration " + i);
         exec.execute(r);
//         if (USE_SLEEP) TestingUtil.sleepRandom(MAX_RANDOM_SLEEP_MILLIS);
         if (USE_SLEEP) TestingUtil.sleepThread(MAX_RANDOM_SLEEP_MILLIS);
      }
      log.warn("Finished generating runnables; awaiting executor completion");
      // wait for executors to complete!
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.