// cost 64
}
@Test
public void test2() throws Exception {
ProblemAnalyzer analyzer = (ProblemAnalyzer) lookup(
MessageAnalyzer.class, ProblemAnalyzer.ID);
MessageTree tree = buildMessage();
long current = System.currentTimeMillis();
long size = 10000000000l;
for (int i = 0; i < size; i++) {
Event event = new DefaultEvent("Exception", "name" + i % 100);
tree.setMessage(event);
analyzer.process(tree);
Event event2 = new DefaultEvent("Error", "name" + i % 100);
tree.setMessage(event2);
analyzer.process(tree);
Event event3 = new DefaultEvent("Call", "name" + i % 100);
tree.setMessage(event3);
analyzer.process(tree);
}
System.out.println(analyzer.getReport("cat"));
System.out.println("Cost " + (System.currentTimeMillis() - current)
/ 1000);
// cost 64
}