Package com.google.common.base

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


    job.setNumReduceTasks(0);
    job.setOutputKeyClass(NullWritable.class);
    job.setOutputValueClass(NullWritable.class);
    job.setOutputFormatClass(NullOutputFormat.class);

    scanTimer.start();
    job.waitForCompletion(true);
    scanTimer.stop();

    Counters counters = job.getCounters();
    long numRows = counters.findCounter(ScanCounter.NUM_ROWS).getValue();
View Full Code Here


    job.setNumReduceTasks(0);
    job.setOutputKeyClass(NullWritable.class);
    job.setOutputValueClass(NullWritable.class);
    job.setOutputFormatClass(NullOutputFormat.class);

    scanTimer.start();
    job.waitForCompletion(true);
    scanTimer.stop();

    Counters counters = job.getCounters();
    long numRows = counters.findCounter(ScanCounter.NUM_ROWS).getValue();
View Full Code Here

    final int printInterval = 100000;
    Random rd = new Random(id);
    boolean get = c.getBoolean("hbase.test.do.gets", false);
    try {
      Stopwatch stopWatch = new Stopwatch();
      stopWatch.start();
      for (int i = 0; i < namespaceSpan; i++) {
        byte [] b = format(rd.nextLong());
        if (get){
          Get g = new Get(b);
          table.get(g);
View Full Code Here

          table.put(p);
        }
        if (i % printInterval == 0) {
          LOG.info("Put " + printInterval + "/" + stopWatch.elapsedMillis());
          stopWatch.reset();
          stopWatch.start();
        }
      }
      LOG.info("Finished a cycle putting " + namespaceSpan + " in " +
          (System.currentTimeMillis() - startTime) + "ms");
    } finally {
View Full Code Here

    @Override
    public PartitionResult getPartitions(TableHandle tableHandle, TupleDomain tupleDomain)
    {
        Stopwatch partitionTimer = new Stopwatch();
        partitionTimer.start();

        checkArgument(tableHandle instanceof NativeTableHandle, "Table must be a native table");

        TableMetadata tableMetadata = metadata.getTableMetadata(tableHandle);
View Full Code Here

    @Override
    public SplitSource getPartitionSplits(TableHandle tableHandle, List<Partition> partitions)
    {
        Stopwatch splitTimer = new Stopwatch();
        splitTimer.start();

        checkNotNull(partitions, "partitions is null");
        if (partitions.isEmpty()) {
            return new FixedSplitSource(getConnectorId(), ImmutableList.<Split>of());
        }
View Full Code Here

  @Override
  public final InputDatum<T> dequeue(long timeout,
                                     TimeUnit timeoutUnit) throws IOException, InterruptedException {
    Stopwatch stopwatch = new Stopwatch();
    stopwatch.start();
    long sleepNano = computeSleepNano(timeout, timeoutUnit);
    long timeoutNano = timeoutUnit.toNanos(timeout);

    InputDatum<T> result = tryDequeue(timeout, timeoutUnit);
    while (!result.needProcess()) {
View Full Code Here

      Matrix o = new DenseMatrix(dense.numRows(), dense.numColumns());
      log.info("warming up " + m.getClass() + " " + o.getClass());
      for (int i = 0; i < 10; i++)
        m.mult(t, o);
      log.info("starting " + m.getClass() + " " + o.getClass());
      watch.start();
      for (int i = 0; i < 100; i++)
        m.mult(t, o);
      watch.stop();
      log.info(m.getClass() + " " + o.getClass() + " " + watch);
    }
View Full Code Here

      Matrix o = new DenseMatrix(dense.numRows(), dense.numColumns());
      log.info("warming up " + m.getClass() + " " + o.getClass());
      for (int i = 0; i < 10; i++)
        m.transAmult(t, o);
      log.info("starting " + m.getClass() + " " + o.getClass());
      watch.start();
      for (int i = 0; i < 100; i++)
        m.transAmult(t, o);
      watch.stop();
      log.info(m.getClass() + " " + o.getClass() + " " + watch);
    }
View Full Code Here

          long denseMem, denseInitTime, denseMultTime, sparseMem, sparseInitTime, sparseMultTime;

          Stopwatch timer = Stopwatch.createUnstarted();
          {
            timer.reset();
            timer.start();
            DenseMatrix A = new DenseMatrix(origA);
            timer.stop();
            // all attempts to measure memory usage failed
            denseMem = n * n * 8;
            denseInitTime = timer.elapsed(TimeUnit.NANOSECONDS);
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.