use of com.navercorp.pinpoint.thrift.dto.TAgentInfo in project pinpoint by naver.
the class AgentInfoSender method createTAgentInfo.
private TAgentInfo createTAgentInfo() {
final TAgentInfo agentInfo = new TAgentInfo();
agentInfo.setIp(this.agentInformation.getHostIp());
agentInfo.setHostname(this.agentInformation.getMachineName());
agentInfo.setPorts("");
agentInfo.setAgentId(this.agentInformation.getAgentId());
agentInfo.setApplicationName(this.agentInformation.getApplicationName());
agentInfo.setPid(this.agentInformation.getPid());
agentInfo.setStartTimestamp(this.agentInformation.getStartTime());
agentInfo.setServiceType(this.agentInformation.getServerType().getCode());
agentInfo.setVmVersion(this.agentInformation.getJvmVersion());
agentInfo.setAgentVersion(Version.VERSION);
if (this.serverMetaData != null) {
agentInfo.setServerMetaData(createTServiceInfo());
}
agentInfo.setJvmInfo(createTJvmInfo());
return agentInfo;
}
use of com.navercorp.pinpoint.thrift.dto.TAgentInfo in project pinpoint by naver.
the class NioUdpDataSenderTest method exceedMessageSendTest.
@Test(expected = IOException.class)
public void exceedMessageSendTest() throws InterruptedException, IOException {
String random = RandomStringUtils.randomAlphabetic(UdpDataSender.UDP_MAX_PACKET_LENGTH + 100);
TAgentInfo agentInfo = new TAgentInfo();
agentInfo.setAgentId(random);
NioUDPDataSender sender = new NioUDPDataSender("localhost", PORT, "test", 128, 1000, 1024 * 64 * 100);
sender.send(agentInfo);
waitMessageReceived(1);
}
use of com.navercorp.pinpoint.thrift.dto.TAgentInfo in project pinpoint by naver.
the class NioUdpDataSenderTest method sendTest1.
@Test
public void sendTest1() throws Exception {
NioUDPDataSender sender = new NioUDPDataSender("localhost", PORT, "test", 128, 1000, 1024 * 64 * 100);
int sendMessageCount = 10;
TAgentInfo agentInfo = new TAgentInfo();
for (int i = 0; i < 10; i++) {
sender.send(agentInfo);
}
try {
waitMessageReceived(sendMessageCount);
} finally {
sender.stop();
}
}
Aggregations