Search in sources :

Example 6 with TAgentInfo

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;
}
Also used : TAgentInfo(com.navercorp.pinpoint.thrift.dto.TAgentInfo)

Example 7 with TAgentInfo

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);
}
Also used : TAgentInfo(com.navercorp.pinpoint.thrift.dto.TAgentInfo) Test(org.junit.Test)

Example 8 with TAgentInfo

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();
    }
}
Also used : TAgentInfo(com.navercorp.pinpoint.thrift.dto.TAgentInfo) Test(org.junit.Test)

Aggregations

TAgentInfo (com.navercorp.pinpoint.thrift.dto.TAgentInfo)8 Test (org.junit.Test)5 UdpDataSender (com.navercorp.pinpoint.profiler.sender.UdpDataSender)1 TResult (com.navercorp.pinpoint.thrift.dto.TResult)1 Header (com.navercorp.pinpoint.thrift.io.Header)1