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");
}
for (int i = 0; i < interval_size.length; i++) {
mem.open();
int sz = interval_size[i];
CounterSink cnt = new CounterSink("null");
EventSink res = new IntervalSampler<CounterSink>(cnt, sz);
EventUtil.dumpAll(mem, res);
b.mark("interval", sz);
res.close();
b.mark("count", cnt.getCount());
}
b.done();
}