Search in sources :

Example 1 with TJvmGcDetailed

use of com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed 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)1 TJvmGcDetailed (com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed)1