Package com.yammer.metrics.core

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


  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

    if(firstSpace > 0) {
      methodName = cql.substring(0, firstSpace);
    }
    String timerName = "asyncExec." + methodName + "." + statement.getObjectName();
    final Timer asyncExecTimer = Metrics.defaultRegistry().newTimer(StatementIteratorConsumer.class, timerName);
    final TimerContext asyncExecTimerContext = asyncExecTimer.time();
    final long startTime = System.nanoTime();
    ResultSetFuture future = null;
    try {
      future = this.cqlExecutor.executeAsync(statement);
    } catch (RuntimeException re) {
View Full Code Here

   */
  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.getTableDesc().setDatabaseName(args.tableOpts.database);
    input.getTableDesc().setTableName(args.tableOpts.table);
    input.setPartitionFilter(args.tableOpts.partitionFilter);
View Full Code Here

    if (!parsedArgs.isPresent()) {
      return;
    }

    Timer allTime = Metrics.newTimer(InputBenchmark.class, "all-time", TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS);
    TimerContext allTimerContext = allTime.time();
    run(parsedArgs.get());
    allTimerContext.stop();

    new ConsoleReporter(System.err).run();
  }
View Full Code Here

              {
                public Res call() throws Exception
                {
                  Timer timer = getTimer(partition);
                 
                  Res res = timer.time(new Callable<Res>(){

                    @Override
                    public Res call() throws Exception {
                      return  handleRequest(senseiReq, readerFactory, _core.getQueryBuilderFactory(), indexReaderCache);
                    }                   
View Full Code Here

          else  // Reuse current thread.
          {
            try
            {
              Timer timer = getTimer(partition);
              Res res = timer.time(new Callable<Res>(){

                @Override
                public Res call() throws Exception {
                  return  handleRequest(senseiReq, readerFactory, _core.getQueryBuilderFactory(), indexReaderCache);
                }                   
View Full Code Here

    if (!parsedArgs.isPresent()) {
      return;
    }

    Timer allTime = Metrics.newTimer(InputBenchmark.class, "all-time", TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS);
    TimerContext allTimerContext = allTime.time();
    run(parsedArgs.get());
    allTimerContext.stop();

    new ConsoleReporter(System.err).run();
  }
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.