Package com.dianping.cat.message

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


    Transaction t = producer.newTransaction("URL", "MyPage");

    try {
      // do your business here
      t.addData("k1", "v1");
      t.addData("k2", "v2");
      t.addData("k3", "v3");

      Thread.sleep(20);

      producer.logEvent("URL", "Payload", Message.SUCCESS, "host=my-host&ip=127.0.0.1&agent=...");
View Full Code Here


    try {
      // do your business here
      t.addData("k1", "v1");
      t.addData("k2", "v2");
      t.addData("k3", "v3");

      Thread.sleep(20);

      producer.logEvent("URL", "Payload", Message.SUCCESS, "host=my-host&ip=127.0.0.1&agent=...");
      t.setStatus(Message.SUCCESS);
View Full Code Here

    Stack<Transaction> stack = new Stack<Transaction>();

    for (int i = 0; i < 10; i++) {
      Transaction t = Cat.getProducer().newTransaction("Test", "TestName");

      t.addData("k1", "v1");
      t.addData("k2", "v2");
      t.addData("k3", "v3");

      stack.push(t);
    }
View Full Code Here

    for (int i = 0; i < 10; i++) {
      Transaction t = Cat.getProducer().newTransaction("Test", "TestName");

      t.addData("k1", "v1");
      t.addData("k2", "v2");
      t.addData("k3", "v3");

      stack.push(t);
    }
View Full Code Here

    for (int i = 0; i < 10; i++) {
      Transaction t = Cat.getProducer().newTransaction("Test", "TestName");

      t.addData("k1", "v1");
      t.addData("k2", "v2");
      t.addData("k3", "v3");

      stack.push(t);
    }

    while (!stack.isEmpty()) {
View Full Code Here

  @Test
  public void sendSendUrlErrorMessage() throws Exception {
    for (int i = 0; i < 100; i++) {
      Transaction t = Cat.getProducer().newTransaction("URL", "Test");

      t.addData("key and value");
      t.setStatus(new NullPointerException());
      t.complete();
    }
    Thread.sleep(10000);
  }
View Full Code Here

    try {
      ModelPeriod period = request.getPeriod();
      String domain = request.getDomain();
      T report = getReport(request, period, domain);

      t.addData("period", period);
      t.addData("domain", domain);

      if (report != null) {
        response.setModel(report);
        t.setStatus(Message.SUCCESS);
View Full Code Here

      ModelPeriod period = request.getPeriod();
      String domain = request.getDomain();
      T report = getReport(request, period, domain);

      t.addData("period", period);
      t.addData("domain", domain);

      if (report != null) {
        response.setModel(report);
        t.setStatus(Message.SUCCESS);
      } else {
View Full Code Here

  @Test
  public void sendSendCallErrorMessage() throws Exception {
    for (int i = 0; i < 100; i++) {
      Transaction t = Cat.getProducer().newTransaction("Call", "Test");

      t.addData("key and value");
      t.setStatus(new NullPointerException());
      t.complete();

    }
    Thread.sleep(1000);
View Full Code Here

  @Test
  public void sendSendSqlErrorMessage() throws Exception {
    for (int i = 0; i < 100; i++) {
      Transaction t = Cat.getProducer().newTransaction("SQL", "Test");

      t.addData("key and value");
      t.setStatus(new NullPointerException());
      t.complete();
    }
    Thread.sleep(1000);
  }
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.