Search in sources :

Example 1 with SampledJvmGcDetailed

use of com.navercorp.pinpoint.web.vo.stat.SampledJvmGcDetailed in project pinpoint by naver.

the class HbaseSampledJvmGcDetailedDaoV2 method getSampledAgentStatList.

@Override
public List<SampledJvmGcDetailed> getSampledAgentStatList(String agentId, TimeWindow timeWindow) {
    long scanFrom = timeWindow.getWindowRange().getFrom();
    long scanTo = timeWindow.getWindowRange().getTo() + timeWindow.getWindowSlotSize();
    Range range = new Range(scanFrom, scanTo);
    AgentStatMapperV2<JvmGcDetailedBo> mapper = operations.createRowMapper(jvmGcDetailedDecoder, range);
    SampledAgentStatResultExtractor<JvmGcDetailedBo, SampledJvmGcDetailed> resultExtractor = new SampledAgentStatResultExtractor<>(timeWindow, mapper, jvmGcDetailedSampler);
    return operations.getSampledAgentStatList(AgentStatType.JVM_GC_DETAILED, resultExtractor, agentId, range);
}
Also used : SampledAgentStatResultExtractor(com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor) JvmGcDetailedBo(com.navercorp.pinpoint.common.server.bo.stat.JvmGcDetailedBo) SampledJvmGcDetailed(com.navercorp.pinpoint.web.vo.stat.SampledJvmGcDetailed) Range(com.navercorp.pinpoint.web.vo.Range)

Example 2 with SampledJvmGcDetailed

use of com.navercorp.pinpoint.web.vo.stat.SampledJvmGcDetailed in project pinpoint by naver.

the class JvmGcDetailedSampler method sampleDataPoints.

@Override
public SampledJvmGcDetailed sampleDataPoints(int timeWindowIndex, long timestamp, List<JvmGcDetailedBo> dataPoints, JvmGcDetailedBo previousDataPoint) {
    List<Long> gcNewCounts = new ArrayList<>(dataPoints.size());
    List<Long> gcNewTimes = new ArrayList<>(dataPoints.size());
    List<Double> codeCacheUseds = new ArrayList<>(dataPoints.size());
    List<Double> newGenUseds = new ArrayList<>(dataPoints.size());
    List<Double> oldGenUseds = new ArrayList<>(dataPoints.size());
    List<Double> survivorSpaceUseds = new ArrayList<>(dataPoints.size());
    List<Double> permGenUseds = new ArrayList<>(dataPoints.size());
    List<Double> metaspaceUseds = new ArrayList<>(dataPoints.size());
    for (JvmGcDetailedBo jvmGcDetailedBo : dataPoints) {
        if (jvmGcDetailedBo.getGcNewCount() != JvmGcDetailedBo.UNCOLLECTED_VALUE) {
            gcNewCounts.add(jvmGcDetailedBo.getGcNewCount());
        }
        if (jvmGcDetailedBo.getGcNewTime() != JvmGcDetailedBo.UNCOLLECTED_VALUE) {
            gcNewTimes.add(jvmGcDetailedBo.getGcNewTime());
        }
        if (jvmGcDetailedBo.getCodeCacheUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            codeCacheUseds.add(jvmGcDetailedBo.getCodeCacheUsed() * 100);
        }
        if (jvmGcDetailedBo.getNewGenUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            newGenUseds.add(jvmGcDetailedBo.getNewGenUsed() * 100);
        }
        if (jvmGcDetailedBo.getOldGenUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            oldGenUseds.add(jvmGcDetailedBo.getOldGenUsed() * 100);
        }
        if (jvmGcDetailedBo.getSurvivorSpaceUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            survivorSpaceUseds.add(jvmGcDetailedBo.getSurvivorSpaceUsed() * 100);
        }
        if (jvmGcDetailedBo.getPermGenUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            permGenUseds.add(jvmGcDetailedBo.getPermGenUsed() * 100);
        }
        if (jvmGcDetailedBo.getMetaspaceUsed() != JvmGcDetailedBo.UNCOLLECTED_PERCENTAGE) {
            metaspaceUseds.add(jvmGcDetailedBo.getMetaspaceUsed() * 100);
        }
    }
    SampledJvmGcDetailed sampledJvmGcDetailed = new SampledJvmGcDetailed();
    sampledJvmGcDetailed.setGcNewCount(createLongPoint(timestamp, gcNewCounts));
    sampledJvmGcDetailed.setGcNewTime(createLongPoint(timestamp, gcNewTimes));
    sampledJvmGcDetailed.setCodeCacheUsed(createDoublePoint(timestamp, codeCacheUseds));
    sampledJvmGcDetailed.setNewGenUsed(createDoublePoint(timestamp, newGenUseds));
    sampledJvmGcDetailed.setOldGenUsed(createDoublePoint(timestamp, oldGenUseds));
    sampledJvmGcDetailed.setSurvivorSpaceUsed(createDoublePoint(timestamp, survivorSpaceUseds));
    sampledJvmGcDetailed.setPermGenUsed(createDoublePoint(timestamp, permGenUseds));
    sampledJvmGcDetailed.setMetaspaceUsed(createDoublePoint(timestamp, metaspaceUseds));
    return sampledJvmGcDetailed;
}
Also used : JvmGcDetailedBo(com.navercorp.pinpoint.common.server.bo.stat.JvmGcDetailedBo) ArrayList(java.util.ArrayList) SampledJvmGcDetailed(com.navercorp.pinpoint.web.vo.stat.SampledJvmGcDetailed)

Aggregations

JvmGcDetailedBo (com.navercorp.pinpoint.common.server.bo.stat.JvmGcDetailedBo)2 SampledJvmGcDetailed (com.navercorp.pinpoint.web.vo.stat.SampledJvmGcDetailed)2 SampledAgentStatResultExtractor (com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor)1 Range (com.navercorp.pinpoint.web.vo.Range)1 ArrayList (java.util.ArrayList)1