Package com.dianping.cat.message

Examples of com.dianping.cat.message.Transaction.addChild()


    transaction.addChild(newTrace("logTrace", "<trace>", timestamp, Trace.SUCCESS, null));
    transaction.addChild(newTrace("logTrace", "<trace>", timestamp, Trace.SUCCESS, "data"));
    transaction.addChild(newEvent("logEvent", "<event>", timestamp, Trace.SUCCESS, "data"));
    transaction.addChild(newEvent("RemoteLink", "<event>", timestamp, Trace.SUCCESS, "data"));
    transaction.addChild(newMetric("logEvent", "<event>", timestamp, Trace.SUCCESS, "data"));
    transaction.addChild(newHeartbeat("logHeartbeat", "<event>", timestamp, Trace.SUCCESS, "data"));

    DefaultMessageTree tree = new DefaultMessageTree();

    tree.setMessage(transaction);
    String messageId = "Cat-0a010680-384736-2061";
View Full Code Here


  @Test
  public void testTransactionNormal() throws Exception {
    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
View Full Code Here

  public void testTransactionNormal() throws Exception {
    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
    root.addChild(newEvent("URL", "View", timestamp + 40, "0", "view=HTML"));
View Full Code Here

    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
    root.addChild(newEvent("URL", "View", timestamp + 40, "0", "view=HTML"));
View Full Code Here

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
    root.addChild(newEvent("URL", "View", timestamp + 40, "0", "view=HTML"));

    MessageTree tree = new DefaultMessageTree();
    tree.setMessage(root);
View Full Code Here

    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
    root.addChild(newEvent("URL", "View", timestamp + 40, "0", "view=HTML"));

    MessageTree tree = new DefaultMessageTree();
    tree.setMessage(root);
    check(tree,
          root,
View Full Code Here

  @Test
  public void testTransactionWithRemoteCall() throws Exception {
    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newEvent("Service", "ReviewService", timestamp + 23, "0", "request data"));
    root.addChild(newEvent("RemoteCall", "Pigeon", timestamp + 23, "0", "domain1-c0a83f99-135bdb7825c-1"));
View Full Code Here

  public void testTransactionWithRemoteCall() throws Exception {
    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newEvent("Service", "ReviewService", timestamp + 23, "0", "request data"));
    root.addChild(newEvent("RemoteCall", "Pigeon", timestamp + 23, "0", "domain1-c0a83f99-135bdb7825c-1"));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
View Full Code Here

    long timestamp = 1325489621987L;
    Transaction root = newTransaction("URL", "Review", timestamp, "0", 100, "/review/2468");

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newEvent("Service", "ReviewService", timestamp + 23, "0", "request data"));
    root.addChild(newEvent("RemoteCall", "Pigeon", timestamp + 23, "0", "domain1-c0a83f99-135bdb7825c-1"));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
View Full Code Here

    root.addChild(newEvent("URL", "Payload", timestamp, "0", "ip=127.0.0.1&ua=Mozilla 5.0...&refer=...&..."));
    root.addChild(newTransaction("Service", "Auth", timestamp, "0", 20, "userId=1357&token=..."));
    root.addChild(newTransaction("Cache", "findReviewByPK", timestamp + 22, "Missing", 1, "2468") //
          .addChild(newEvent("CacheHost", "host-1", timestamp + 22, "0", "ip=192.168.8.123")));
    root.addChild(newEvent("Service", "ReviewService", timestamp + 23, "0", "request data"));
    root.addChild(newEvent("RemoteCall", "Pigeon", timestamp + 23, "0", "domain1-c0a83f99-135bdb7825c-1"));
    root.addChild(newTransaction("DAL", "findReviewByPK", timestamp + 25, "0", 5,
          "select title,content from Review where id = ?"));
    root.addChild(newEvent("URL", "View", timestamp + 40, "0", "view=HTML"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.