use of com.navercorp.pinpoint.thrift.dto.TLoadedClass in project pinpoint by naver.
the class StatThriftMessageConverter method convertLoadedClass.
private TLoadedClass convertLoadedClass(LoadedClassMetricSnapshot loadedClassMetricSnapshot) {
final TLoadedClass tLoadedClass = new TLoadedClass();
tLoadedClass.setLoadedClassCount(loadedClassMetricSnapshot.getLoadedClassCount());
tLoadedClass.setUnloadedClassCount(loadedClassMetricSnapshot.getUnloadedClassCount());
return tLoadedClass;
}
use of com.navercorp.pinpoint.thrift.dto.TLoadedClass in project pinpoint by naver.
the class ThriftLoadedClassCountBoMapperTest method create.
@Override
protected TLoadedClass create() {
TLoadedClass tLoadedClass = new TLoadedClass();
tLoadedClass.setLoadedClassCount(getRandomInteger(0, MAX_THREAD_COUNT));
tLoadedClass.setUnloadedClassCount(getRandomInteger(0, MAX_THREAD_COUNT));
return tLoadedClass;
}
use of com.navercorp.pinpoint.thrift.dto.TLoadedClass in project pinpoint by naver.
the class StatThriftMessageConverter method convertAgentStat.
private TAgentStat convertAgentStat(final AgentStatMetricSnapshot agentStatMetricSnapshot) {
final TAgentStat agentStat = new TAgentStat();
agentStat.setTimestamp(agentStatMetricSnapshot.getTimestamp());
agentStat.setCollectInterval(agentStatMetricSnapshot.getCollectInterval());
// Agent information
agentStat.setAgentId(agentStatMetricSnapshot.getAgentId());
agentStat.setStartTimestamp(agentStatMetricSnapshot.getStartTimestamp());
// Metric
final JvmGcMetricSnapshot jvmGcMetricSnapshot = agentStatMetricSnapshot.getGc();
if (jvmGcMetricSnapshot != null) {
final TJvmGc jvmGc = convertJvmGc(jvmGcMetricSnapshot);
agentStat.setGc(jvmGc);
}
final CpuLoadMetricSnapshot cpuLoadMetricSnapshot = agentStatMetricSnapshot.getCpuLoad();
if (cpuLoadMetricSnapshot != null) {
final TCpuLoad cpuLoad = convertCpuLoad(cpuLoadMetricSnapshot);
agentStat.setCpuLoad(cpuLoad);
}
final TransactionMetricSnapshot transactionMetricSnapshot = agentStatMetricSnapshot.getTransaction();
if (transactionMetricSnapshot != null) {
final TTransaction transaction = convertTransaction(transactionMetricSnapshot);
agentStat.setTransaction(transaction);
}
final ActiveTraceHistogram activeTraceHistogram = agentStatMetricSnapshot.getActiveTrace();
if (activeTraceHistogram != null) {
final TActiveTrace activeTrace = convertActiveTrace(activeTraceHistogram);
agentStat.setActiveTrace(activeTrace);
}
final DataSourceMetricSnapshot dataSourceMetricSnapshot = agentStatMetricSnapshot.getDataSourceList();
if (dataSourceMetricSnapshot != null) {
final TDataSourceList dataSourceList = convertDataSourceList(dataSourceMetricSnapshot);
agentStat.setDataSourceList(dataSourceList);
}
final ResponseTimeValue responseTimeValue = agentStatMetricSnapshot.getResponseTime();
if (responseTimeValue != null) {
final TResponseTime responseTime = convertResponseTime(responseTimeValue);
agentStat.setResponseTime(responseTime);
}
final DeadlockMetricSnapshot deadlockMetricSnapshot = agentStatMetricSnapshot.getDeadlock();
if (deadlockMetricSnapshot != null) {
final TDeadlock deadlock = convertDeadlock(deadlockMetricSnapshot);
agentStat.setDeadlock(deadlock);
}
final FileDescriptorMetricSnapshot fileDescriptorMetricSnapshot = agentStatMetricSnapshot.getFileDescriptor();
if (fileDescriptorMetricSnapshot != null) {
final TFileDescriptor fileDescriptor = convertFileDescriptor(fileDescriptorMetricSnapshot);
agentStat.setFileDescriptor(fileDescriptor);
}
final BufferMetricSnapshot bufferMetricSnapshot = agentStatMetricSnapshot.getDirectBuffer();
if (bufferMetricSnapshot != null) {
final TDirectBuffer directBuffer = convertDirectBuffer(bufferMetricSnapshot);
agentStat.setDirectBuffer(directBuffer);
}
final TotalThreadMetricSnapshot totalThreadMetricSnapshot = agentStatMetricSnapshot.getTotalThread();
if (totalThreadMetricSnapshot != null) {
final TTotalThreadCount totalThreadCount = convertTotalThreadCount(totalThreadMetricSnapshot);
agentStat.setTotalThreadCount(totalThreadCount);
}
final LoadedClassMetricSnapshot loadedClassMetricSnapshot = agentStatMetricSnapshot.getLoadedClassCount();
if (loadedClassMetricSnapshot != null) {
final TLoadedClass loadedClass = convertLoadedClass(loadedClassMetricSnapshot);
agentStat.setLoadedClass(loadedClass);
}
return agentStat;
}
Aggregations