txt.close();
b.mark("disk_loaded");
Event e = null;
NullSink sink = new NullSink();
SyslogEntryFormat syslog = new SyslogEntryFormat();
while ((e = mem.next()) != null) {
Event e2 = syslog.extract(new String(e.getBody()), 2009);
sink.append(e2);
}
sink.close();
b.mark("warmup done");
e = null;
mem.open();
while ((e = mem.next()) != null) {
Event e2 = syslog.extract(new String(e.getBody()), 2009);
sink.append(e2);
}
sink.close();
b.mark("sample dump done");
e = null;
mem.open();
CounterSink sink2 = new CounterSink("counter");
while ((e = mem.next()) != null) {
Event e2 = syslog.extract(new String(e.getBody()), 2009);
sink2.append(e2);
}
sink2.close();
b.mark("count done", sink2.getCount());