Search in sources :

Example 1 with SampledDirectBuffer

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

the class DirectBufferSampler method sampleDataPoints.

@Override
public SampledDirectBuffer sampleDataPoints(int timeWindowIndex, long timestamp, List<DirectBufferBo> dataPoints, DirectBufferBo previousDataPoint) {
    final AgentStatPoint<Long> directCount = newAgentStatPoint(timestamp, dataPoints, DirectBufferBo::getDirectCount);
    final AgentStatPoint<Long> directMemoryUsed = newAgentStatPoint(timestamp, dataPoints, DirectBufferBo::getDirectMemoryUsed);
    final AgentStatPoint<Long> mappedCount = newAgentStatPoint(timestamp, dataPoints, DirectBufferBo::getMappedCount);
    final AgentStatPoint<Long> mappedMemoryUsed = newAgentStatPoint(timestamp, dataPoints, DirectBufferBo::getMappedMemoryUsed);
    SampledDirectBuffer sampledDirectBuffer = new SampledDirectBuffer(directCount, directMemoryUsed, mappedCount, mappedMemoryUsed);
    return sampledDirectBuffer;
}
Also used : SampledDirectBuffer(com.navercorp.pinpoint.web.vo.stat.SampledDirectBuffer) DirectBufferBo(com.navercorp.pinpoint.common.server.bo.stat.DirectBufferBo)

Example 2 with SampledDirectBuffer

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

the class HbaseSampledDirectBufferDaoV2 method getSampledAgentStatList.

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

Aggregations

DirectBufferBo (com.navercorp.pinpoint.common.server.bo.stat.DirectBufferBo)2 SampledDirectBuffer (com.navercorp.pinpoint.web.vo.stat.SampledDirectBuffer)2 SampledAgentStatResultExtractor (com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor)1 Range (com.navercorp.pinpoint.web.vo.Range)1