Package com.google.common.base

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


        } catch (ExecutionException e) {
          LOG.error("Failed to publish logs to Kafka.", e);
          TimeUnit.NANOSECONDS.sleep(backOffTime);
          publishTimeout -= stopwatch.elapsedTime(timeoutUnit);
          stopwatch.reset();
          stopwatch.start();
        }
      } while (publishTimeout > 0);
    } catch (InterruptedException e) {
      LOG.warn("Logs publish to Kafka interrupted.", e);
    }
View Full Code Here


    boolean shouldFsync = !isLagging;
   
    curSegment.writeRaw(records, 0, records.length);
    curSegment.setReadyToFlush();
    Stopwatch sw = new Stopwatch();
    sw.start();
    curSegment.flush(shouldFsync);
    sw.stop();
   
    metrics.addSync(sw.elapsedTime(TimeUnit.MICROSECONDS));
    if (sw.elapsedTime(TimeUnit.MILLISECONDS) > WARN_SYNC_MILLIS_THRESHOLD) {
View Full Code Here

    boolean shouldFsync = !isLagging;
   
    curSegment.writeRaw(records, 0, records.length);
    curSegment.setReadyToFlush();
    Stopwatch sw = new Stopwatch();
    sw.start();
    curSegment.flush(shouldFsync);
    sw.stop();
   
    metrics.addSync(sw.elapsedTime(TimeUnit.MICROSECONDS));
View Full Code Here

    s.setRange(new Range());

    Stopwatch sw = new Stopwatch();
    Iterator<Entry<Key,Value>> iterator = s.iterator();

    sw.start();
    while (iterator.hasNext()) {
      sw.stop();

      // While we "do work" in the client, we should be fetching the next result
      UtilWaitThread.sleep(100l);
View Full Code Here

      sw.stop();

      // While we "do work" in the client, we should be fetching the next result
      UtilWaitThread.sleep(100l);
      iterator.next();
      sw.start();
    }
    sw.stop();

    long millisWithWait = sw.elapsed(TimeUnit.MILLISECONDS);
View Full Code Here

    s.setReadaheadThreshold(0l);

    sw = new Stopwatch();
    iterator = s.iterator();

    sw.start();
    while (iterator.hasNext()) {
      sw.stop();

      // While we "do work" in the client, we should be fetching the next result
      UtilWaitThread.sleep(100l);
View Full Code Here

      sw.stop();

      // While we "do work" in the client, we should be fetching the next result
      UtilWaitThread.sleep(100l);
      iterator.next();
      sw.start();
    }
    sw.stop();

    long millisWithNoWait = sw.elapsed(TimeUnit.MILLISECONDS);
View Full Code Here

      ParquetRecordReader rr = new ParquetRecordReader(context, 256000, fileName, 0, fs,
          new CodecFactoryExposer(dfsConfig), f.getParquetMetadata(), columns);
      TestOutputMutator mutator = new TestOutputMutator(allocator);
      rr.setup(mutator);
      Stopwatch watch = new Stopwatch();
      watch.start();

      int rowCount = 0;
      while ((rowCount = rr.next()) > 0) {
        totalRowCount += rowCount;
      }
View Full Code Here

  }

  @Override
  public int next() {
    Stopwatch watch = new Stopwatch();
    watch.start();
    if (rowKeyVector != null) {
      rowKeyVector.clear();
      rowKeyVector.allocateNew();
    }
    for (ValueVector v : familyVectorMap.values()) {
View Full Code Here

  }

  @Override
  public int next() {
    Stopwatch watch = new Stopwatch();
    watch.start();
    if (rowKeyVector != null) {
      rowKeyVector.clear();
      rowKeyVector.allocateNew();
    }
    for (ValueVector v : familyVectorMap.values()) {
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.