Search in sources :

Example 1 with PJvmGcType

use of com.navercorp.pinpoint.grpc.trace.PJvmGcType 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 PJvmGcType

use of com.navercorp.pinpoint.grpc.trace.PJvmGcType in project pinpoint by naver.

the class GrpcAgentInfoMessageConverter method convertJvmInfo.

private PJvmInfo convertJvmInfo(final JvmInformation jvmInformation) {
    final PJvmInfo.Builder builder = PJvmInfo.newBuilder();
    builder.setVmVersion(jvmInformation.getJvmVersion());
    PJvmGcType gcType = this.jvmGcTypeMessageConverter.toMessage(jvmInformation.getJvmGcType());
    builder.setGcType(gcType);
    return builder.build();
}
Also used : PJvmInfo(com.navercorp.pinpoint.grpc.trace.PJvmInfo) PJvmGcType(com.navercorp.pinpoint.grpc.trace.PJvmGcType)

Aggregations

PJvmGcType (com.navercorp.pinpoint.grpc.trace.PJvmGcType)2 PJvmGc (com.navercorp.pinpoint.grpc.trace.PJvmGc)1 PJvmGcDetailed (com.navercorp.pinpoint.grpc.trace.PJvmGcDetailed)1 PJvmInfo (com.navercorp.pinpoint.grpc.trace.PJvmInfo)1 JvmGcDetailedMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.JvmGcDetailedMetricSnapshot)1