Package com.google.common.base

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


        log.debug("Partition retrieval, native table %s (%d partitions): %dms", tableHandle, tablePartitions.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));

        Multimap<String, ? extends PartitionKey> allPartitionKeys = shardManager.getAllPartitionKeys(tableHandle);
        Map<String, ColumnHandle> columnHandles = metadata.getColumnHandles(tableHandle);

        log.debug("Partition key retrieval, native table %s (%d keys): %dms", tableHandle, allPartitionKeys.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));

        List<Partition> partitions = ImmutableList.copyOf(Collections2.transform(tablePartitions, new PartitionFunction(columnHandles, allPartitionKeys)));

        log.debug("Partition generation, native table %s (%d partitions): %dms", tableHandle, partitions.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));
View Full Code Here


        log.debug("Partition key retrieval, native table %s (%d keys): %dms", tableHandle, allPartitionKeys.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));

        List<Partition> partitions = ImmutableList.copyOf(Collections2.transform(tablePartitions, new PartitionFunction(columnHandles, allPartitionKeys)));

        log.debug("Partition generation, native table %s (%d partitions): %dms", tableHandle, partitions.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));

        return new PartitionResult(partitions, tupleDomain);
    }

    @Override
View Full Code Here

                Split split = new NativeSplit(entry.getKey(), addresses);
                splits.add(split);
            }
        }

        log.debug("Split retrieval for %d partitions (%d splits): %dms", partitions.size(), splits.size(), splitTimer.elapsed(TimeUnit.MILLISECONDS));

        // the query engine assumes that splits are returned in a somewhat random fashion. The native split manager,
        // because it loads the data from a db table will return the splits somewhat ordered by node id so only a sub
        // set of nodes is fired up. Shuffle the splits to ensure random distribution.
        Collections.shuffle(splits);
View Full Code Here

            Stopwatch partitionTimer = Stopwatch.createStarted();
            PartitionResult matchingPartitions = splitManager.getPartitions(node.getTable(), Optional.of(tupleDomain));
            List<Partition> partitions = matchingPartitions.getPartitions();
            TupleDomain undeterminedTupleDomain = matchingPartitions.getUndeterminedTupleDomain();
            log.debug("Partition retrieval, table %s (%d partitions): %dms", node.getTable(), partitions.size(), partitionTimer.elapsed(TimeUnit.MILLISECONDS));

            Expression unevaluatedDomainPredicate = DomainTranslator.toPredicate(undeterminedTupleDomain, ImmutableBiMap.copyOf(node.getAssignments()).inverse());

            // Construct the post scan predicate. Add the unevaluated TupleDomain back first since those are generally cheaper to evaluate than anything we can't extract
            Expression postScanPredicate = combineConjuncts(unevaluatedDomainPredicate, extractionRemainingExpression);
View Full Code Here

            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);
            timer.reset();

            DenseMatrix B = origB.copy();
            DenseMatrix C = new DenseMatrix(n, n);
            timer.start();
View Full Code Here

            DenseMatrix B = origB.copy();
            DenseMatrix C = new DenseMatrix(n, n);
            timer.start();
            A.mult(B, C);
            timer.stop();
            denseMultTime = timer.elapsed(TimeUnit.NANOSECONDS);
          }
          {
            timer.reset();
            timer.start();
            LinkedSparseMatrix A = new LinkedSparseMatrix(origA);
View Full Code Here

            timer.start();
            LinkedSparseMatrix A = new LinkedSparseMatrix(origA);
            timer.stop();
            // using compressedooms
            sparseMem = m * 28 + 16 * n;
            sparseInitTime = timer.elapsed(TimeUnit.NANOSECONDS);
            timer.reset();

            DenseMatrix B = origB.copy();
            DenseMatrix C = new DenseMatrix(n, n);
            timer.start();
View Full Code Here

            DenseMatrix B = origB.copy();
            DenseMatrix C = new DenseMatrix(n, n);
            timer.start();
            A.mult(B, C);
            timer.stop();
            sparseMultTime = timer.elapsed(TimeUnit.NANOSECONDS);
          }

          String[] line = new String[]{
              Integer.toString(n), Integer.toString(m),
              Long.toString(denseMem), Long.toString(denseInitTime), Long.toString(denseMultTime),
View Full Code Here

        }
        SubSchemaWrapper wrapper = new SubSchemaWrapper(drillSchema);
        parent.add(wrapper.getName(), wrapper);
      }

      logger.debug("Took {} ms to register schemas.", watch.elapsed(TimeUnit.MILLISECONDS));
    }

  }

}
View Full Code Here

    }

    Stopwatch watch = new Stopwatch();
    watch.start();
    root.accept(i, context);
    logger.debug("Took {} ms to accept", watch.elapsed(TimeUnit.MILLISECONDS));
    if (i.root == null)
      throw new ExecutionSetupException(
          "The provided fragment did not have a root node that correctly created a RootExec value.");
    return i.getRoot();
  }
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.