use of com.navercorp.pinpoint.profiler.JvmInformation in project pinpoint by naver.
the class GrpcAgentInfoMessageConverter method convertAgentInfo.
public PAgentInfo convertAgentInfo(final AgentInfo agentInfo) {
final AgentInformation agentInformation = agentInfo.getAgentInformation();
final PAgentInfo.Builder builder = PAgentInfo.newBuilder();
builder.setIp(agentInformation.getHostIp());
builder.setHostname(agentInformation.getMachineName());
builder.setPorts("");
builder.setContainer(agentInformation.isContainer());
builder.setPid(agentInformation.getPid());
builder.setServiceType(agentInformation.getServerType().getCode());
builder.setVmVersion(agentInformation.getJvmVersion());
builder.setAgentVersion(Version.VERSION);
final ServerMetaData serverMetaData = agentInfo.getServerMetaData();
if (serverMetaData != null) {
final PServerMetaData tServerMetaData = convertServerMetaData(agentInfo.getServerMetaData());
builder.setServerMetaData(tServerMetaData);
}
final JvmInformation jvmInformation = agentInfo.getJvmInfo();
if (jvmInformation != null) {
final PJvmInfo tJvmInfo = convertJvmInfo(agentInfo.getJvmInfo());
builder.setJvmInfo(tJvmInfo);
}
return builder.build();
}
use of com.navercorp.pinpoint.profiler.JvmInformation in project pinpoint by naver.
the class AgentGrpcDataSenderTestMain method newAgentInfo.
private AgentInfo newAgentInfo() {
AgentInformation agentInformation = new DefaultAgentInformation(AGENT_ID, AGENT_NAME, APPLICATION_NAME, true, START_TIME, 99, "", "", ServiceType.TEST_STAND_ALONE, "1.0", "1.0");
JvmInformation jvmInformation = new JvmInformation("1.0", JvmGcType.G1);
ServerMetaData serverInfo = new DefaultServerMetaData("serverInfo", Collections.<String>emptyList(), Collections.<Integer, String>emptyMap(), Collections.<ServiceInfo>emptyList());
return new AgentInfo(agentInformation, serverInfo, jvmInformation);
}
Aggregations