b.mark("receiver_started");
final ThriftEventSink tsnk = new ThriftEventSink("0.0.0.0",
conf.getCollectorPort());
// make size happen first all the time.
final BatchingDecorator snk = new BatchingDecorator(tsnk, 100, 10000000);
snk.open();
b.mark("sink_started");
EventUtil.dumpAll(mem, snk);
b.mark("thrift sink to thrift source done");
// MB/s = B/us
b.mark("MB/s", (double) tsnk.getSentBytes()
/ (double) (b.getLastDelta() / 1000));
tes.close();
snk.close();
drain.interrupt();
b.done();
}