Search in sources :

Example 1 with TDirectBuffer

use of com.navercorp.pinpoint.thrift.dto.TDirectBuffer in project pinpoint by naver.

the class StatThriftMessageConverter method convertDirectBuffer.

private TDirectBuffer convertDirectBuffer(BufferMetricSnapshot bufferMetricSnapshot) {
    final TDirectBuffer tdirectBuffer = new TDirectBuffer();
    tdirectBuffer.setDirectCount(bufferMetricSnapshot.getDirectCount());
    tdirectBuffer.setDirectMemoryUsed(bufferMetricSnapshot.getDirectMemoryUsed());
    tdirectBuffer.setMappedCount(bufferMetricSnapshot.getMappedCount());
    tdirectBuffer.setMappedMemoryUsed(bufferMetricSnapshot.getMappedMemoryUsed());
    return tdirectBuffer;
}
Also used : TDirectBuffer(com.navercorp.pinpoint.thrift.dto.TDirectBuffer)

Example 2 with TDirectBuffer

use of com.navercorp.pinpoint.thrift.dto.TDirectBuffer in project pinpoint by naver.

the class ThriftDirectBufferBoMapperTest method create.

@Override
protected TDirectBuffer create() {
    TDirectBuffer directBuffer = new TDirectBuffer();
    directBuffer.setDirectCount(getRandomLong(0, 5000));
    directBuffer.setDirectMemoryUsed(getRandomLong(0, 1000000));
    directBuffer.setMappedCount(getRandomLong(0, 5000));
    directBuffer.setMappedMemoryUsed(getRandomLong(0, 1000000));
    return directBuffer;
}
Also used : TDirectBuffer(com.navercorp.pinpoint.thrift.dto.TDirectBuffer)

Example 3 with TDirectBuffer

use of com.navercorp.pinpoint.thrift.dto.TDirectBuffer 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;
}
Also used : ResponseTimeValue(com.navercorp.pinpoint.profiler.monitor.metric.response.ResponseTimeValue) TAgentStat(com.navercorp.pinpoint.thrift.dto.TAgentStat) BufferMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetricSnapshot) TActiveTrace(com.navercorp.pinpoint.thrift.dto.TActiveTrace) TotalThreadMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.totalthread.TotalThreadMetricSnapshot) TJvmGc(com.navercorp.pinpoint.thrift.dto.TJvmGc) FileDescriptorMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.filedescriptor.FileDescriptorMetricSnapshot) TDirectBuffer(com.navercorp.pinpoint.thrift.dto.TDirectBuffer) ActiveTraceHistogram(com.navercorp.pinpoint.profiler.context.active.ActiveTraceHistogram) TActiveTraceHistogram(com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram) CpuLoadMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.cpu.CpuLoadMetricSnapshot) TCpuLoad(com.navercorp.pinpoint.thrift.dto.TCpuLoad) TResponseTime(com.navercorp.pinpoint.thrift.dto.TResponseTime) TDeadlock(com.navercorp.pinpoint.thrift.dto.TDeadlock) TDataSourceList(com.navercorp.pinpoint.thrift.dto.TDataSourceList) DataSourceMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.datasource.DataSourceMetricSnapshot) JvmGcMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot) TLoadedClass(com.navercorp.pinpoint.thrift.dto.TLoadedClass) DeadlockMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.deadlock.DeadlockMetricSnapshot) LoadedClassMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.loadedclass.LoadedClassMetricSnapshot) TFileDescriptor(com.navercorp.pinpoint.thrift.dto.TFileDescriptor) TTotalThreadCount(com.navercorp.pinpoint.thrift.dto.TTotalThreadCount) TransactionMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.transaction.TransactionMetricSnapshot) TTransaction(com.navercorp.pinpoint.thrift.dto.TTransaction)

Aggregations

TDirectBuffer (com.navercorp.pinpoint.thrift.dto.TDirectBuffer)3 ActiveTraceHistogram (com.navercorp.pinpoint.profiler.context.active.ActiveTraceHistogram)1 JvmGcMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot)1 BufferMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.buffer.BufferMetricSnapshot)1 CpuLoadMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.cpu.CpuLoadMetricSnapshot)1 DataSourceMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.datasource.DataSourceMetricSnapshot)1 DeadlockMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.deadlock.DeadlockMetricSnapshot)1 FileDescriptorMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.filedescriptor.FileDescriptorMetricSnapshot)1 LoadedClassMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.loadedclass.LoadedClassMetricSnapshot)1 ResponseTimeValue (com.navercorp.pinpoint.profiler.monitor.metric.response.ResponseTimeValue)1 TotalThreadMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.totalthread.TotalThreadMetricSnapshot)1 TransactionMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.transaction.TransactionMetricSnapshot)1 TActiveTrace (com.navercorp.pinpoint.thrift.dto.TActiveTrace)1 TActiveTraceHistogram (com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram)1 TAgentStat (com.navercorp.pinpoint.thrift.dto.TAgentStat)1 TCpuLoad (com.navercorp.pinpoint.thrift.dto.TCpuLoad)1 TDataSourceList (com.navercorp.pinpoint.thrift.dto.TDataSourceList)1 TDeadlock (com.navercorp.pinpoint.thrift.dto.TDeadlock)1 TFileDescriptor (com.navercorp.pinpoint.thrift.dto.TFileDescriptor)1 TJvmGc (com.navercorp.pinpoint.thrift.dto.TJvmGc)1