656667686970717273
MemorySinkSource mem2 = new MemorySinkSource(); EventUtil.dumpAll(seq, mem2); seq.close(); b2.mark("seqfile_loaded"); b2.done(); } }
7475767778798081828384
b.mark("MB/s", (double) snk.getSentBytes() / (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } /** * mem -> batch(10) AvroEventSink -> AvroEventSource -> NullSink */
121122123124125126127128129130131
/ (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } /** * mem -> batch(10) AvroEventSink -> AvroEventSource -> NullSink */
168169170171172173174175176177178
/ (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } /** * This is slighlty different by using another thread to kick off the sink. It * shouldn't really matter much.
b.mark("MB/s", (double) snk.getSentBytes() / (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } /** * mem -> batch(10) ThriftEventSink -> ThriftEventSource -> NullSink */
/ (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } /** * mem -> batch(10) ThriftEventSink -> ThriftEventSource -> NullSink */
234235236237238239240241242243244
Thread.sleep(1000); tes.close(); snk.close(); t.interrupt(); drain.interrupt(); b.done(); } /** * Here we are using the ThriftRawEventSink instead of the ThriftEventSink *
288289290291292293294295296
/ (double) (b.getLastDelta() / 1000)); tes.close(); snk.close(); drain.interrupt(); b.done(); } }
6869707172737475767778
b.mark("reservoir", sz); res.close(); b.mark("count", cnt.getCount()); } b.done(); } @Test public void testIntervalSampler() throws IOException, InterruptedException { Benchmark b = new Benchmark("Interval sampler + nullsink");