Package com.cloudera.util

Examples of com.cloudera.util.Benchmark.done()


    b.mark("thrift sink to thrift source done");

    tes.close();
    snk.close();
    drain.interrupt();
    b.done();
  }

}
View Full Code Here


    Assert.assertEquals(2916, histo.get("ConnectException"));
    Assert.assertEquals(230663, histo.get("Lost tracker"));
    Assert.assertEquals(166834, histo.get("mapred.TaskTracker: Resending"));
   
   
    b.done();
  }
}
View Full Code Here

    b.mark("seqfile_disk_write");

    sink.close();
    b.mark("seqfile size", tmp.length());
    b.done();

    // //////// second phase using the file written in previous phase.
    Benchmark b2 = new Benchmark("seqfile_disk_read");
    b2.mark("begin");
View Full Code Here

    MemorySinkSource mem2 = new MemorySinkSource();
    EventUtil.dumpAll(seq, mem2);
    seq.close();
    b2.mark("seqfile_loaded");

    b2.done();
  }

  @Test
  public void testReadFormat() throws IOException {
    Benchmark b = new Benchmark("log4j format read");
View Full Code Here

    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    txt.close();
    b.mark("log4j_disk_loaded");
    b.done();
  }
}
View Full Code Here

    b.mark("hdfs_copy_started");
    hdfs.copyFromLocalFile(src, dst);
    b.mark("hdfs_copy_done");
    hdfs.close();
    b.done();
  }

  @Test
  public void testDirectWrite() throws IOException {
View Full Code Here

    }
    w.close();
    b.mark("seqfile_hdfs_write");

    hdfs.close();
    b.done();
  }

}
View Full Code Here

      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkFirst");
    } else if (Arrays.equals(bench, BenchmarkInjectDecorator.BENCH_STOP)) {
      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkDone");
      b.done();

      ReportEvent rpt = getReport();
      LOG.info(rpt.toText());
      reportSink.append(rpt);
View Full Code Here

      reportSink.append(rpt);

    } else if (Arrays.equals(bench, BenchmarkInjectDecorator.BENCH_ERROR)) {
      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkError");
      b.done();
      LOG.info(getReport().toText());

      ReportEvent rpt = getReport();
      LOG.info(rpt.toText());
      reportSink.append(rpt);
View Full Code Here

      EventUtil.dumpAll(mem, tes);
    }

    b.mark("done");

    b.done();
    tes.close();

  }

  static public void main(String[] argv) throws IOException {
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.