Search in sources :

Example 1 with SampledFileDescriptor

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

the class HbaseSampledFileDescriptorDaoV2 method getSampledAgentStatList.

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

Example 2 with SampledFileDescriptor

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

the class FileDescriptorSampler method sampleDataPoints.

@Override
public SampledFileDescriptor sampleDataPoints(int timeWindowIndex, long timestamp, List<FileDescriptorBo> dataPoints, FileDescriptorBo previousDataPoint) {
    final AgentStatPoint<Long> openFileDescriptorCount = newAgentStatPoint(timestamp, dataPoints, FileDescriptorBo::getOpenFileDescriptorCount);
    SampledFileDescriptor sampledFileDescriptor = new SampledFileDescriptor(openFileDescriptorCount);
    return sampledFileDescriptor;
}
Also used : FileDescriptorBo(com.navercorp.pinpoint.common.server.bo.stat.FileDescriptorBo) SampledFileDescriptor(com.navercorp.pinpoint.web.vo.stat.SampledFileDescriptor)

Aggregations

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