Search in sources :

Example 1 with JvmGcDetailedMetricSnapshot

use of com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot in project pinpoint by naver.

the class GrpcStatMessageConverter method convertJvmGc.

private PJvmGc convertJvmGc(JvmGcMetricSnapshot jvmGcMetricSnapshot) {
    final PJvmGc.Builder jvmGcBuilder = PJvmGc.newBuilder();
    jvmGcBuilder.setJvmMemoryHeapMax(jvmGcMetricSnapshot.getJvmMemoryHeapMax());
    jvmGcBuilder.setJvmMemoryHeapUsed(jvmGcMetricSnapshot.getJvmMemoryHeapUsed());
    jvmGcBuilder.setJvmMemoryNonHeapMax(jvmGcMetricSnapshot.getJvmMemoryNonHeapMax());
    jvmGcBuilder.setJvmMemoryNonHeapUsed(jvmGcMetricSnapshot.getJvmMemoryNonHeapUsed());
    jvmGcBuilder.setJvmGcOldCount(jvmGcMetricSnapshot.getJvmGcOldCount());
    jvmGcBuilder.setJvmGcOldTime(jvmGcMetricSnapshot.getJvmGcOldTime());
    final PJvmGcType jvmGcType = this.jvmGcTypeConverter.toMessage(jvmGcMetricSnapshot.getType());
    jvmGcBuilder.setType(jvmGcType);
    if (jvmGcMetricSnapshot.getJvmGcDetailed() != null) {
        final JvmGcDetailedMetricSnapshot jvmGcDetailedMetricSnapshot = jvmGcMetricSnapshot.getJvmGcDetailed();
        final PJvmGcDetailed.Builder jvmGcDetailedBuilder = PJvmGcDetailed.newBuilder();
        jvmGcDetailedBuilder.setJvmPoolNewGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolNewGenUsed());
        jvmGcDetailedBuilder.setJvmPoolOldGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolOldGenUsed());
        jvmGcDetailedBuilder.setJvmPoolSurvivorSpaceUsed(jvmGcDetailedMetricSnapshot.getJvmPoolSurvivorSpaceUsed());
        jvmGcDetailedBuilder.setJvmPoolCodeCacheUsed(jvmGcDetailedMetricSnapshot.getJvmPoolCodeCacheUsed());
        jvmGcDetailedBuilder.setJvmPoolPermGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolPermGenUsed());
        jvmGcDetailedBuilder.setJvmPoolMetaspaceUsed(jvmGcDetailedMetricSnapshot.getJvmPoolMetaspaceUsed());
        jvmGcDetailedBuilder.setJvmGcNewCount(jvmGcDetailedMetricSnapshot.getJvmGcNewCount());
        jvmGcDetailedBuilder.setJvmGcNewTime(jvmGcDetailedMetricSnapshot.getJvmGcNewTime());
        jvmGcBuilder.setJvmGcDetailed(jvmGcDetailedBuilder.build());
    }
    return jvmGcBuilder.build();
}
Also used : PJvmGc(com.navercorp.pinpoint.grpc.trace.PJvmGc) PJvmGcType(com.navercorp.pinpoint.grpc.trace.PJvmGcType) JvmGcDetailedMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot) PJvmGcDetailed(com.navercorp.pinpoint.grpc.trace.PJvmGcDetailed)

Example 2 with JvmGcDetailedMetricSnapshot

use of com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot in project pinpoint by naver.

the class DetailedJvmGcMetricCollector method collect.

@Override
public JvmGcMetricSnapshot collect() {
    final JvmGcMetricSnapshot jvmGcMetricSnapshot = jvmGcMetricCollector.collect();
    final DetailedMemoryMetricSnapshot detailedMemoryMetricSnapshot = detailedMemoryMetric.getSnapshot();
    final DetailedGarbageCollectorMetricSnapshot detailedGarbageCollectorMetricSnapshot = detailedGarbageCollectorMetric.getSnapshot();
    final JvmGcDetailedMetricSnapshot jvmGcDetailedMetricSnapshot = new JvmGcDetailedMetricSnapshot();
    jvmGcDetailedMetricSnapshot.setJvmPoolNewGenUsed(detailedMemoryMetricSnapshot.getNewGenUsage());
    jvmGcDetailedMetricSnapshot.setJvmPoolOldGenUsed(detailedMemoryMetricSnapshot.getOldGenUsage());
    jvmGcDetailedMetricSnapshot.setJvmPoolSurvivorSpaceUsed(detailedMemoryMetricSnapshot.getSurvivorSpaceUsage());
    jvmGcDetailedMetricSnapshot.setJvmPoolCodeCacheUsed(detailedMemoryMetricSnapshot.getCodeCacheUsage());
    jvmGcDetailedMetricSnapshot.setJvmPoolPermGenUsed(detailedMemoryMetricSnapshot.getPermGenUsage());
    jvmGcDetailedMetricSnapshot.setJvmPoolMetaspaceUsed(detailedMemoryMetricSnapshot.getMetaspaceUsage());
    jvmGcDetailedMetricSnapshot.setJvmGcNewCount(detailedGarbageCollectorMetricSnapshot.getGcNewCount());
    jvmGcDetailedMetricSnapshot.setJvmGcNewTime(detailedGarbageCollectorMetricSnapshot.getGcNewTime());
    jvmGcMetricSnapshot.setJvmGcDetailed(jvmGcDetailedMetricSnapshot);
    return jvmGcMetricSnapshot;
}
Also used : DetailedGarbageCollectorMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.gc.DetailedGarbageCollectorMetricSnapshot) JvmGcDetailedMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot) JvmGcMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot) DetailedMemoryMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.memory.DetailedMemoryMetricSnapshot)

Example 3 with JvmGcDetailedMetricSnapshot

use of com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot in project pinpoint by naver.

the class StatThriftMessageConverter method convertJvmGc.

private TJvmGc convertJvmGc(JvmGcMetricSnapshot jvmGcMetricSnapshot) {
    final TJvmGc jvmGc = new TJvmGc();
    jvmGc.setJvmMemoryHeapMax(jvmGcMetricSnapshot.getJvmMemoryHeapMax());
    jvmGc.setJvmMemoryHeapUsed(jvmGcMetricSnapshot.getJvmMemoryHeapUsed());
    jvmGc.setJvmMemoryNonHeapMax(jvmGcMetricSnapshot.getJvmMemoryNonHeapMax());
    jvmGc.setJvmMemoryNonHeapUsed(jvmGcMetricSnapshot.getJvmMemoryNonHeapUsed());
    jvmGc.setJvmGcOldCount(jvmGcMetricSnapshot.getJvmGcOldCount());
    jvmGc.setJvmGcOldTime(jvmGcMetricSnapshot.getJvmGcOldTime());
    final TJvmGcType jvmGcType = this.jvmGcTypeMessageConverter.toMessage(jvmGcMetricSnapshot.getType());
    jvmGc.setType(jvmGcType);
    if (jvmGcMetricSnapshot.getJvmGcDetailed() != null) {
        final JvmGcDetailedMetricSnapshot jvmGcDetailedMetricSnapshot = jvmGcMetricSnapshot.getJvmGcDetailed();
        final TJvmGcDetailed jvmGcDetailed = new TJvmGcDetailed();
        jvmGcDetailed.setJvmPoolNewGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolNewGenUsed());
        jvmGcDetailed.setJvmPoolOldGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolOldGenUsed());
        jvmGcDetailed.setJvmPoolSurvivorSpaceUsed(jvmGcDetailedMetricSnapshot.getJvmPoolSurvivorSpaceUsed());
        jvmGcDetailed.setJvmPoolCodeCacheUsed(jvmGcDetailedMetricSnapshot.getJvmPoolCodeCacheUsed());
        jvmGcDetailed.setJvmPoolPermGenUsed(jvmGcDetailedMetricSnapshot.getJvmPoolPermGenUsed());
        jvmGcDetailed.setJvmPoolMetaspaceUsed(jvmGcDetailedMetricSnapshot.getJvmPoolMetaspaceUsed());
        jvmGcDetailed.setJvmGcNewCount(jvmGcDetailedMetricSnapshot.getJvmGcNewCount());
        jvmGcDetailed.setJvmGcNewTime(jvmGcDetailedMetricSnapshot.getJvmGcNewTime());
        jvmGc.setJvmGcDetailed(jvmGcDetailed);
    }
    return jvmGc;
}
Also used : TJvmGcDetailed(com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed) TJvmGcType(com.navercorp.pinpoint.thrift.dto.TJvmGcType) JvmGcDetailedMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot) TJvmGc(com.navercorp.pinpoint.thrift.dto.TJvmGc)

Aggregations

JvmGcDetailedMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot)3 PJvmGc (com.navercorp.pinpoint.grpc.trace.PJvmGc)1 PJvmGcDetailed (com.navercorp.pinpoint.grpc.trace.PJvmGcDetailed)1 PJvmGcType (com.navercorp.pinpoint.grpc.trace.PJvmGcType)1 JvmGcMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot)1 DetailedGarbageCollectorMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.gc.DetailedGarbageCollectorMetricSnapshot)1 DetailedMemoryMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.memory.DetailedMemoryMetricSnapshot)1 TJvmGc (com.navercorp.pinpoint.thrift.dto.TJvmGc)1 TJvmGcDetailed (com.navercorp.pinpoint.thrift.dto.TJvmGcDetailed)1 TJvmGcType (com.navercorp.pinpoint.thrift.dto.TJvmGcType)1