Search in sources :

Example 6 with TJvmGc

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

the class JvmGcDetailedMetricCollector method collect.

@Override
public TJvmGc collect() {
    TJvmGcDetailed jvmGcDetailed = new TJvmGcDetailed();
    jvmGcDetailed.setJvmPoolNewGenUsed(memoryMetric.newGenUsage());
    jvmGcDetailed.setJvmPoolOldGenUsed(memoryMetric.oldGenUsage());
    jvmGcDetailed.setJvmPoolCodeCacheUsed(memoryMetric.codeCacheUsage());
    jvmGcDetailed.setJvmPoolSurvivorSpaceUsed(memoryMetric.survivorUsage());
    Double permGenUsed = memoryMetric.permGenUsage();
    if (permGenUsed != null) {
        // metric for jvm < 1.8
        jvmGcDetailed.setJvmPoolPermGenUsed(memoryMetric.permGenUsage());
    } else {
        // metric for jvm >= 1.8
        jvmGcDetailed.setJvmPoolMetaspaceUsed(memoryMetric.metaspaceUsage());
    }
    jvmGcDetailed.setJvmGcNewCount(garbageCollectorMetric.gcNewCount());
    jvmGcDetailed.setJvmGcNewTime(garbageCollectorMetric.gcNewTime());
    TJvmGc jvmGc = jvmGcCommonMetricCollector.collect();
    jvmGc.setJvmGcDetailed(jvmGcDetailed);
    return jvmGc;
}
Also used : TJvmGcDetailed(com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed) TJvmGc(com.navercorp.pinpoint.thrift.dto.TJvmGc)

Aggregations

TJvmGc (com.navercorp.pinpoint.thrift.dto.TJvmGc)6 TAgentStat (com.navercorp.pinpoint.thrift.dto.TAgentStat)3 TCpuLoad (com.navercorp.pinpoint.thrift.dto.TCpuLoad)2 ActiveTraceHistogramBo (com.navercorp.pinpoint.common.server.bo.ActiveTraceHistogramBo)1 AgentStatMemoryGcBo (com.navercorp.pinpoint.common.server.bo.AgentStatMemoryGcBo)1 TActiveTrace (com.navercorp.pinpoint.thrift.dto.TActiveTrace)1 TDataSourceList (com.navercorp.pinpoint.thrift.dto.TDataSourceList)1 TJvmGcDetailed (com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed)1 TTransaction (com.navercorp.pinpoint.thrift.dto.TTransaction)1 AgentStat (com.navercorp.pinpoint.web.vo.AgentStat)1 ArrayList (java.util.ArrayList)1 Put (org.apache.hadoop.hbase.client.Put)1 TDeserializer (org.apache.thrift.TDeserializer)1 TSerializer (org.apache.thrift.TSerializer)1 TProtocolFactory (org.apache.thrift.protocol.TProtocolFactory)1