Package com.dianping.cat.consumer.transaction

Examples of com.dianping.cat.consumer.transaction.TransactionAnalyzer


public class TransactionPerformanceTest  extends ComponentTestCase{

  @Test
  public void test() throws Exception {
    TransactionAnalyzer analyzer = (TransactionAnalyzer) lookup(MessageAnalyzer.class, TransactionAnalyzer.ID);
   
    MessageTree tree = buildMessage();

    long current = System.currentTimeMillis();

    long size = 10000000000l;
    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 62
  }
View Full Code Here


    long currentTimeMillis = System.currentTimeMillis();

    m_timestamp = currentTimeMillis - currentTimeMillis % (3600 * 1000);

    try {
      TransactionAnalyzer transactionAnalyzer = (TransactionAnalyzer) lookup(MessageAnalyzer.class,
            TransactionAnalyzer.ID);
      TransactionDelegate transactionDelegate = (TransactionDelegate) lookup(ReportDelegate.class, "transaction");
      MockTransactionReportManager transactionManager = (MockTransactionReportManager) lookup(ReportManager.class,
            "transaction");

View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.transaction.TransactionAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.