use of com.navercorp.pinpoint.profiler.monitor.metric.memory.CmsGcMemoryMetric in project pinpoint by naver.
the class MemoryMetricProvider method get.
@Override
public MemoryMetric get() {
Map<String, Metric> memoryUsageMetrics = memoryUsageGaugeSet.getMetrics();
Set<String> metricNames = memoryUsageMetrics.keySet();
MemoryMetric memoryMetric;
if (metricNames.contains(MetricMonitorValues.METRIC_MEMORY_POOLS_SERIAL_OLDGEN_USAGE)) {
memoryMetric = new SerialGcMemoryMetric(memoryUsageMetrics);
} else if (metricNames.contains(MetricMonitorValues.METRIC_MEMORY_POOLS_PS_OLDGEN_USAGE)) {
memoryMetric = new ParallelGcMemoryMetric(memoryUsageMetrics);
} else if (metricNames.contains(MetricMonitorValues.METRIC_MEMORY_POOLS_CMS_OLDGEN_USAGE)) {
memoryMetric = new CmsGcMemoryMetric(memoryUsageMetrics);
} else if (metricNames.contains(MetricMonitorValues.METRIC_MEMORY_POOLS_G1_OLDGEN_USAGE)) {
memoryMetric = new G1GcMemoryMetric(memoryUsageMetrics);
} else {
memoryMetric = new UnknownMemoryMetric(memoryUsageMetrics);
}
logger.info("loaded : {}", memoryMetric);
return memoryMetric;
}
Aggregations