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);
t.addChild(error);