Examples of time()


Examples of ch.agent.t2.time.TimeDomain.time()

 
  public void testGetLastValue_1() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeDomain dom = s.getTimeDomain();
      Range range = new Range(dom.time("2011-05-15"), dom.time("2011-07-15"));
      TimeAddressable<Double> ts = s.getValues(range);
      Observation<Double> obs = ts.getLast(dom.time("2011-06-01"));
      assertEquals("2011-06-01", obs.getTime().toString());
    } catch (Exception e) {
      fail(e.toString());
View Full Code Here

Examples of codeanticode.gsvideo.GSMovie.time()

    protected void onNewFrame() {
      super.onNewFrame();
     
      GSMovie m = getMovie();
      if (!stopSliderAdvance && m != null && slider != null){
        slider.setValue(m.time()); //ONLY UPDATE the slider position WHEN NOT DRAGGING THE SLIDER
      }
    }
   
    @Override
    protected void setDefaultGestureActions() {
View Full Code Here

Examples of com.aphyr.riemann.client.EventDSL.time()

                    sb.append(separator);
                    sb.append(part);
                }

                event.service(sb.toString());
                event.time(timestamp);
                event.attribute("metric-type", metricType);
                return event;
            }
        };
    }
View Full Code Here

Examples of com.codahale.metrics.Timer.time()

        if (filterRegistry.size() == 0)
            throw new RuntimeException("Empty filter registry!");

        for (MessageFilter filter : filterRegistry) {
            Timer timer = metricRegistry.timer(name(filter.getClass(), "executionTime"));
            final Timer.Context timerContext = timer.time();

            try {
                LOG.debug("Applying filter [{}] on message <{}>.", filter.getName(), msg.getId());

                if (filter.filter(msg)) {
View Full Code Here

Examples of com.codahale.metrics.Timer.time()

                    Map<StreamRule, Boolean> result = getRuleMatches(stream, msg);
                    return doesStreamMatch(result);
                }
            };

            try (final Timer.Context timerContext = timer.time()) {
                boolean matched = timeLimiter.callWithTimeout(task, timeout, TimeUnit.MILLISECONDS, true);
                if (matched) {
                    getIncomingMeter(stream.getId()).mark();
                    matches.add(stream);
                }
View Full Code Here

Examples of com.codahale.metrics.Timer.time()

        public void onEvent(RequestEvent event) {
            if (event.getType() == RequestEvent.Type.RESOURCE_METHOD_START) {
                final Timer timer = this.timers.get(event.getUriInfo()
                        .getMatchedResourceMethod().getInvocable().getDefinitionMethod());
                if (timer != null) {
                    this.context = timer.time();
                }
            } else if (event.getType() == RequestEvent.Type.RESOURCE_METHOD_FINISHED) {
                if (this.context != null) {
                    this.context.close();
                }
View Full Code Here

Examples of com.codahale.metrics.Timer.time()

    void handleStart(Exchange exchange, MetricRegistry registry, String metricsName) {
        String propertyName = getPropertyName(metricsName);
        Timer.Context context = getTimerContextFromExchange(exchange, propertyName);
        if (context == null) {
            Timer timer = registry.timer(metricsName);
            context = timer.time();
            exchange.setProperty(propertyName, context);
        } else {
            LOG.warn("Timer \"{}\" already running", metricsName);
        }
    }
View Full Code Here

Examples of com.yammer.metrics.core.Timer.time()

  public void run(InputBenchmarkCmd args) throws Exception {
    HadoopNative.requireHadoopNative();

    Timer allTime = Metrics.newTimer(InputBenchmark.class, "all-time", MILLISECONDS, MILLISECONDS);
    TimerContext allTimerContext = allTime.time();

    HiveInputDescription input = new HiveInputDescription();
    input.setDbName(args.tableOpts.database);
    input.setTableName(args.tableOpts.table);
    input.setPartitionFilter(args.tableOpts.partitionFilter);
View Full Code Here

Examples of com.yammer.metrics.core.Timer.time()

  public void run(InputBenchmarkCmd args) throws Exception {
    HadoopNative.requireHadoopNative();

    Timer allTime = Metrics.newTimer(InputBenchmark.class, "all-time", MILLISECONDS, MILLISECONDS);
    TimerContext allTimerContext = allTime.time();

    HiveInputDescription input = new HiveInputDescription();
    input.setDbName(args.tableOpts.database);
    input.setTableName(args.tableOpts.table);
    input.setPartitionFilter(args.tableOpts.partitionFilter);
View Full Code Here

Examples of com.yammer.metrics.core.TimerMetric.time()

      @SuppressWarnings({ "unchecked", "rawtypes" })
      @Override
      public void run() {
        while (!stop) {
          try {
            searchTimer.time(new Callable() {
              @Override
              public Object call() throws Exception {
                return testHandler.queryHandler.handleQuery();
              }
            });
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.