Search in sources :

Example 1 with GarbageCollectorMetricSnapshot

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

the class BasicJvmGcMetricCollector method collect.

@Override
public JvmGcMetricSnapshot collect() {
    final JvmGcType jvmGcType = garbageCollectorMetric.getGcType();
    final MemoryMetricSnapshot memoryMetricSnapshot = memoryMetric.getSnapshot();
    final GarbageCollectorMetricSnapshot garbageCollectorMetricSnapshot = garbageCollectorMetric.getSnapshot();
    final JvmGcMetricSnapshot jvmGcMetricSnapshot = new JvmGcMetricSnapshot();
    jvmGcMetricSnapshot.setJvmMemoryHeapMax(memoryMetricSnapshot.getHeapMax());
    jvmGcMetricSnapshot.setJvmMemoryHeapUsed(memoryMetricSnapshot.getHeapUsed());
    jvmGcMetricSnapshot.setJvmMemoryNonHeapMax(memoryMetricSnapshot.getNonHeapMax());
    jvmGcMetricSnapshot.setJvmMemoryNonHeapUsed(memoryMetricSnapshot.getNonHeapUsed());
    jvmGcMetricSnapshot.setJvmGcOldCount(garbageCollectorMetricSnapshot.getGcOldCount());
    jvmGcMetricSnapshot.setJvmGcOldTime(garbageCollectorMetricSnapshot.getGcOldTime());
    jvmGcMetricSnapshot.setType(jvmGcType);
    return jvmGcMetricSnapshot;
}
Also used : GarbageCollectorMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.gc.GarbageCollectorMetricSnapshot) MemoryMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.memory.MemoryMetricSnapshot) JvmGcMetricSnapshot(com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot) JvmGcType(com.navercorp.pinpoint.profiler.monitor.metric.gc.JvmGcType)

Aggregations

JvmGcMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.JvmGcMetricSnapshot)1 GarbageCollectorMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.gc.GarbageCollectorMetricSnapshot)1 JvmGcType (com.navercorp.pinpoint.profiler.monitor.metric.gc.JvmGcType)1 MemoryMetricSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.memory.MemoryMetricSnapshot)1