Package com.dianping.cat.message.internal

Examples of com.dianping.cat.message.internal.DefaultEvent


    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "192.168.7.70");

    Message message = new DefaultEvent("PigeonService.client", "192.168.7.71", null);
    Message messageApp = new DefaultEvent("PigeonService.app", "myDomain", null);
    t.addChild(message);
    t.addChild(messageApp);

    info = analyzer.parseCorssTransaction(t, tree);
View Full Code Here


    DefaultTransaction t = new DefaultTransaction("Service", "method1", null);
    MessageTree tree = buildMockMessageTree();
    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Message message = new DefaultEvent("PigeonService.client", "192.168.7.71:29987", null);
    Message messageApp = new DefaultEvent("PigeonService.app", "myDomain", null);
    t.addChild(message);
    t.addChild(messageApp);

    info = analyzer.parseCorssTransaction(t, tree);
View Full Code Here

    Assert.assertEquals(expected, actual);
  }

  private Event newEvent(String type, String name, long timestamp, String status, String data) {
    DefaultEvent event = new DefaultEvent(type, name);

    event.setStatus(status);
    event.addData(data);
    event.setTimestamp(timestamp);
    return event;
  }
View Full Code Here

      t2.setStatus("ERROR");
    } else {
      t2.setStatus(Message.SUCCESS);
    }

    DefaultEvent event1 = new DefaultEvent("test2", "fail");
    event1.setTimestamp(m_timestamp + 5 * 60 * 1000);

    t2.addChild(event1);
    t2.complete();
    t2.setDurationInMillis(i);

    t.addChild(t2);

    if (i % 2 == 0) {
      t.setStatus("ERROR");
    } else {
      t.setStatus(Message.SUCCESS);
    }

    DefaultEvent event = new DefaultEvent("test1", "success");
    event.setTimestamp(m_timestamp + 5 * 60 * 1000);
    event.setStatus(Message.SUCCESS);
    t.addChild(event);

    t.complete();
    t.setDurationInMillis(i * 2);
    t.setTimestamp(m_timestamp + 1000);
View Full Code Here

    tree.setHostName("group001");
    tree.setIpAddress("192.168.1.1");
    tree.setThreadGroupName("cat");
    tree.setThreadName("Cat-ProblemAnalyzer-Test");
    if (i < 10) {
      DefaultEvent error = new DefaultEvent("Error", "Error", null);
     
      error.setTimestamp(m_timestamp);
      tree.setMessage(error);
    } else if (i < 20) {
      DefaultHeartbeat heartbeat = new DefaultHeartbeat("heartbeat", "heartbeat");
     
      heartbeat.setTimestamp(m_timestamp);
      tree.setMessage(heartbeat);
    } else {

      DefaultTransaction t = new DefaultTransaction("A", "n" + i % 2, null);

      t.setTimestamp(m_timestamp);
      t.setDurationInMillis(i * 50);

      switch (i % 7) {
      case 0:
        t.setType("URL");
        break;
      case 1:
        t.setType("Call");
        break;
      case 2:
        t.setType("Cache.");
        t.setDurationInMillis(i * 5);
        break;
      case 3:
        t.setType("SQL");
        break;
      case 4:
        t.setType("PigeonCall");
        break;
      case 5:
        t.setType("Service");
        break;
      case 6:
        t.setType("PigeonService");
        break;
      }

      Event error = new DefaultEvent("Error", "Error", null);
      Event exception = new DefaultEvent("Other", "Exception", null);
      Heartbeat heartbeat = new DefaultHeartbeat("heartbeat", "heartbeat");
      DefaultTransaction transaction = new DefaultTransaction("Transaction", "Transaction", null);

      transaction.setStatus(Transaction.SUCCESS);
      t.addChild(transaction);
View Full Code Here

TOP

Related Classes of com.dianping.cat.message.internal.DefaultEvent

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.