use of com.navercorp.pinpoint.common.server.bo.stat.EachUriStatBo in project pinpoint by naver.
the class EachUriStatCodecV2 method decodeValues.
@Override
public List<EachUriStatBo> decodeValues(Buffer valueBuffer, AgentStatDecodingContext decodingContext) {
final int numValues = valueBuffer.readVInt();
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
EachUriStatBoCodecDecoder eachUriStatBoCodecDecoder = new EachUriStatBoCodecDecoder(codec);
eachUriStatBoCodecDecoder.decode(valueBuffer, headerDecoder, numValues);
List<EachUriStatBo> eachUriStatBoList = new ArrayList<>(numValues);
for (int i = 0; i < numValues; i++) {
EachUriStatBo eachUriStatBo = eachUriStatBoCodecDecoder.getValue(i);
eachUriStatBoList.add(eachUriStatBo);
}
return eachUriStatBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.EachUriStatBo in project pinpoint by naver.
the class SampledUriStatResultExtractor method getSampleData.
private SampledAgentUriStat getSampleData(List<EachUriStatBo> eachUriStatBos) {
eachUriStatBos.sort(Comparator.comparingLong(EachUriStatBo::getTimestamp).reversed());
AgentStatSamplingHandler<EachUriStatBo, SampledEachUriStatBo> samplingHandler = new EagerSamplingHandler<>(timeWindow, sampler);
for (EachUriStatBo eachUriStatBo : eachUriStatBos) {
samplingHandler.addDataPoint(eachUriStatBo);
}
List<SampledEachUriStatBo> sampledDataPoints = samplingHandler.getSampledDataPoints();
SampledAgentUriStat sampledAgentUriStat = new SampledAgentUriStat(sampledDataPoints);
return sampledAgentUriStat;
}
Aggregations