public class DependencyPerformanceTest extends ComponentTestCase {
@Test
public void test() throws Exception {
DependencyAnalyzer analyzer = (DependencyAnalyzer)lookup(MessageAnalyzer.class,DependencyAnalyzer.ID);
MessageTree tree = buildMessage();
long current = System.currentTimeMillis();
int size = 10000000;
for (int i = 0; i < size; i++) {
analyzer.process(tree);
}
System.out.println(analyzer.getReport("cat"));
System.out.println("Cost " + (System.currentTimeMillis() - current) / 1000);
// cost 26
}