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;
}
Aggregations