Examples of elapsed()


Examples of com.google.common.base.Stopwatch.elapsed()

            migrate(scheduleIds, find1HourData, Bucket.ONE_HOUR);
            migrate(scheduleIds, find6HourData, Bucket.SIX_HOUR);
            migrate(scheduleIds, find24HourData, Bucket.TWENTY_FOUR_HOUR);

            stopwatch.stop();
            log.info("Finished aggregate metrics migration in " + stopwatch.elapsed(TimeUnit.SECONDS) + " seconds");

            if (failedMigrations.get() > 0) {
                throw new RuntimeException("There were " + failedMigrations.get() + " failed migrations. The " +
                    "upgrade will have to be run again to complete the migration.");
            }
View Full Code Here

Examples of com.google_voltpatches.common.base.Stopwatch.elapsed()

        // N.B. There will only be an entry in the map if the service has started
        for (Entry<Service, Stopwatch> entry : startupTimers.entrySet()) {
          Service service = entry.getKey();
          Stopwatch stopWatch = entry.getValue();
          if (!stopWatch.isRunning() && !(service instanceof NoOpService)) {
            loadTimes.add(Maps.immutableEntry(service, stopWatch.elapsed(MILLISECONDS)));
          }
        }
      } finally {
        monitor.leave();
      }
View Full Code Here

Examples of fitnesse.util.TimeMeasurement.elapsed()

    client.addFitClientListener(this);
    client.start();
    Thread.sleep(50);
    client.join();
    assertTrue(exceptionOccurred);
    assertTrue(measurement.elapsed() < CommandRunningFitClient.TIMEOUT);
  }

  @Test
  public void testOneRunWithManyTables() throws Exception {
    client.start();
View Full Code Here

Examples of jersey.repackaged.com.google.common.base.Stopwatch.elapsed()

      throw new ExecutionException(e);
    } catch (Error e) {
      throw new ExecutionError(e);
    } finally {
      if (!success) {
        globalStatsCounter.recordLoadException(stopwatch.elapsed(NANOSECONDS));
      }
    }

    if (result == null) {
      globalStatsCounter.recordLoadException(stopwatch.elapsed(NANOSECONDS));
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

        showFrame(list);
        tester.actionSelectRow(list, new JListLocation(data[0]));
        assertEquals("Wrong item selected", 0, list.getSelectedIndex());
        Timer timer = new Timer();
        while (mw.clickCount == 0) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                throw new RuntimeException("Timed out waiting for clicks");
            tester.sleep();
        }
        assertEquals("Too many clicks", 1, mw.clickCount);
    }
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

        showFrame(list);
        tester.actionSelectIndex(list, 0);
        assertEquals("Wrong item selected", 0, list.getSelectedIndex());
        Timer timer = new Timer();
        while (mw.clickCount == 0) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                throw new RuntimeException("Timed out waiting for clicks");
            tester.sleep();
        }
        assertEquals("Too many clicks", 1, mw.clickCount);
    }
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

        thread.start();

        WindowTracker tracker = getWindowTracker();
        Timer timer = new Timer();
        while (appletStartCount < appletCount) {
            if (timer.elapsed() > 60000) {
                fail("AppletViewer failed to launch");
            }
            robot.sleep();
        }
    }
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

        FocusWatcher fw = new FocusWatcher();
        red.text.addFocusListener(fw);
        robot.focus(red.text, true);
        Timer timer = new Timer();
        while (!fw.gotFocus) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY) {
                Log.log("Failing applet focus");
                fail("Red applet text field never received focus");
            }
            robot.sleep();
        }
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

        fw = new FocusWatcher();
        green.text.addFocusListener(fw);
        robot.focus(green.text, true);
        timer.reset();
        while (!fw.gotFocus) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY) {
                Log.log("Failing text field focus");
                fail("Green applet text field never received focus");
            }
            robot.sleep();
        }
View Full Code Here

Examples of junit.extensions.abbot.Timer.elapsed()

    private WindowTracker tracker;

    private void wait(Window w, boolean state, String msg) {
        Timer timer = new Timer();
        while (tracker.isWindowReady(w) != state) {
            if (timer.elapsed() > 5000)
                fail(msg);
            try { Thread.sleep(10); } catch(InterruptedException e) { }
        }
    }
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.