Package com.dianping.cat.message

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


  @Test
  public void testTransactionNormal() {
    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


  public void testTransactionNormal() {
    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"));

    check(root, "t2012-01-02 15:33:41.987\tURL\tReview\t\n" + //
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"));

    check(root, "t2012-01-02 15:33:41.987\tURL\tReview\t\n" + //
          "E2012-01-02 15:33:41.987\tURL\tPayload\t0\tip=127.0.0.1&ua=Mozilla 5.0...&refer=...&...\t\n" + //
          "A2012-01-02 15:33:41.987\tService\tAuth\t0\t20000us\tuserId=1357&token=...\t\n" + //
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"));

    check(root, "t2012-01-02 15:33:41.987\tURL\tReview\t\n" + //
          "E2012-01-02 15:33:41.987\tURL\tPayload\t0\tip=127.0.0.1&ua=Mozilla 5.0...&refer=...&...\t\n" + //
          "A2012-01-02 15:33:41.987\tService\tAuth\t0\t20000us\tuserId=1357&token=...\t\n" + //
          "t2012-01-02 15:33:42.009\tCache\tfindReviewByPK\t\n" + //
View Full Code Here

  private DefaultMessageTree buildMessageTree() {
    long timestamp = 1325489621987L;
    Transaction transaction = newTransaction("transaction", "transaction", timestamp, Message.SUCCESS, 8000, null);

    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"));
View Full Code Here

  private DefaultMessageTree buildMessageTree() {
    long timestamp = 1325489621987L;
    Transaction transaction = newTransaction("transaction", "transaction", timestamp, Message.SUCCESS, 8000, null);

    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"));
View Full Code Here

    long timestamp = 1325489621987L;
    Transaction transaction = newTransaction("transaction", "transaction", timestamp, Message.SUCCESS, 8000, null);

    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();
View Full Code Here

    Transaction transaction = newTransaction("transaction", "transaction", timestamp, Message.SUCCESS, 8000, null);

    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();
View Full Code Here

    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);
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.