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