Package org.infinispan.profiling.testinternals

Examples of org.infinispan.profiling.testinternals.TaskRunner.execute()


      long startTime = System.currentTimeMillis();
      TaskRunner runner = 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 fqn : fqns) {
         runner.execute(new Runnable() {
            public void run() {
               try {
                  // this will create the necessary nodes.
                  cache.put(fqn, "key", Collections.emptyMap());
               }
View Full Code Here


         });
      }

      // loop through WARMUP_LOOPS gets and puts for JVM optimisation
      for (int i = 0; i < WARMUP_LOOPS; i++) {
         runner.execute(new Runnable() {
            public void run() {
               try {
                  Fqn fqn = Generator.getRandomElement(fqns);
                  DummyTransactionManager.getInstance().begin();
                  cache.get(fqn, "key");
View Full Code Here

               r = new Remover(i, durationRemoves);
               break;
         }
         if (i % print == 0)
            log.warn("processing iteration " + i);
         runner.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

      }
      long startTime = System.currentTimeMillis();
      TaskRunner exec = new TaskRunner(NUM_THREADS, true);
      log.warn("Starting warmup");
      for (final Object key : keys) {
         exec.execute(new Runnable() {
            public void run() {
               // this will create the necessary entries.
               cache.put(key, 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() {
               Object key = Generator.getRandomElement(keys);
               cache.get(key);
               cache.put(key, "Value");
               cache.remove(key);
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

      long startTime = System.currentTimeMillis();
      TaskRunner runner = 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 fqn : fqns) {
         runner.execute(new Runnable() {
            public void run() {
               try {
                  // this will create the necessary nodes.
                  cache.put(fqn, "key", Collections.emptyMap());
               }
View Full Code Here

         });
      }

      // loop through WARMUP_LOOPS gets and puts for JVM optimisation
      for (int i = 0; i < WARMUP_LOOPS; i++) {
         runner.execute(new Runnable() {
            public void run() {
               try {
                  Fqn fqn = Generator.getRandomElement(fqns);
                  DummyTransactionManager.getInstance().begin();
                  cache.get(fqn, "key");
View Full Code Here

               r = new Remover(i, durationRemoves);
               break;
         }
         if (i % print == 0)
            log.warn("processing iteration " + i);
         runner.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

      long startTime = System.currentTimeMillis();
      TaskRunner runner = 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 fqn : fqns) {
         runner.execute(new Runnable() {
            public void run() {
               try {
                  // this will create the necessary nodes.
                  cache.put(fqn, "key", Collections.emptyMap());
               }
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.