MemorySinkSource mem = new MemorySinkSource();
mem.open();
EventUtil.dumpAll(txt, mem);
b.mark("disk_loaded");
NullSink nullsnk = new NullSink();
EventUtil.dumpAll(mem, nullsnk);
b.mark("warmup");
int interval_size[] = { 100000, 10000, 1000, 100 };
for (int i = 0; i < interval_size.length; i++) {
mem.open();
int sz = interval_size[i];
EventSink res = new IntervalSampler<NullSink>(new NullSink(), sz);
EventUtil.dumpAll(mem, res);
b.mark("interval " + sz + " sampling done", sz);
res.close();
b.mark("sample dump done");