use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class LoadedClassCodec method decodeValues.
@Override
public List<JoinStatBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {
final String id = decodingContext.getApplicationId();
final long baseTimestamp = decodingContext.getBaseTimestamp();
final long timestampDelta = decodingContext.getTimestampDelta();
final long initialTimestamp = baseTimestamp + timestampDelta;
int numValues = valueBuffer.readVInt();
List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);
// decode headers
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
JoinLongFieldEncodingStrategy loadedClassEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
JoinLongFieldEncodingStrategy unloadedClassEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
// decode values
List<JoinLongFieldBo> loadedClassList = this.codec.decodeValues(valueBuffer, loadedClassEncodingStrategy, numValues);
List<JoinLongFieldBo> unloadedClassList = this.codec.decodeValues(valueBuffer, unloadedClassEncodingStrategy, numValues);
List<JoinStatBo> joinLoadedClassBoList = new ArrayList<JoinStatBo>(numValues);
for (int i = 0; i < numValues; i++) {
JoinLoadedClassBo joinLoadedClassBo = new JoinLoadedClassBo();
joinLoadedClassBo.setId(id);
joinLoadedClassBo.setTimestamp(timestamps.get(i));
joinLoadedClassBo.setLoadedClassJoinValue(loadedClassList.get(i));
joinLoadedClassBo.setUnloadedClassJoinValue(unloadedClassList.get(i));
joinLoadedClassBoList.add(joinLoadedClassBo);
}
return joinLoadedClassBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class ResponseTimeCodec method decodeValues.
@Override
public List<JoinStatBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {
final String id = decodingContext.getApplicationId();
final long baseTimestamp = decodingContext.getBaseTimestamp();
final long timestampDelta = decodingContext.getTimestampDelta();
final long initialTimestamp = baseTimestamp + timestampDelta;
int numValues = valueBuffer.readVInt();
List<Long> timestampList = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
JoinLongFieldEncodingStrategy responseTimeEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
final List<JoinLongFieldBo> responseTimeList = this.codec.decodeValues(valueBuffer, responseTimeEncodingStrategy, numValues);
List<JoinStatBo> joinResponseTimeBoList = new ArrayList<JoinStatBo>();
for (int i = 0; i < numValues; i++) {
JoinResponseTimeBo joinResponseTimeBo = new JoinResponseTimeBo();
joinResponseTimeBo.setId(id);
joinResponseTimeBo.setTimestamp(timestampList.get(i));
joinResponseTimeBo.setResponseTimeJoinValue(responseTimeList.get(i));
joinResponseTimeBoList.add(joinResponseTimeBo);
}
return joinResponseTimeBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class FileDescriptorCodec method decodeValues.
@Override
public List<JoinStatBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {
final String id = decodingContext.getApplicationId();
final long baseTimestamp = decodingContext.getBaseTimestamp();
final long timestampDelta = decodingContext.getTimestampDelta();
final long initialTimestamp = baseTimestamp + timestampDelta;
int numValues = valueBuffer.readVInt();
List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);
// decode headers
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
JoinLongFieldEncodingStrategy openFileDescriptorCountEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
// decode values
final List<JoinLongFieldBo> openFileDescriptorCounts = this.codec.decodeValues(valueBuffer, openFileDescriptorCountEncodingStrategy, numValues);
List<JoinStatBo> joinFileDescriptorBoList = new ArrayList<>(numValues);
for (int i = 0; i < numValues; i++) {
JoinFileDescriptorBo joinFileDescriptorBo = new JoinFileDescriptorBo();
joinFileDescriptorBo.setId(id);
joinFileDescriptorBo.setTimestamp(timestamps.get(i));
joinFileDescriptorBo.setOpenFdCountJoinValue(openFileDescriptorCounts.get(i));
joinFileDescriptorBoList.add(joinFileDescriptorBo);
}
return joinFileDescriptorBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class DirectBufferCodec method decodeValues.
@Override
public List<JoinStatBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {
final String id = decodingContext.getApplicationId();
final long baseTimestamp = decodingContext.getBaseTimestamp();
final long timestampDelta = decodingContext.getTimestampDelta();
final long initialTimestamp = baseTimestamp + timestampDelta;
int numValues = valueBuffer.readVInt();
List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);
// decode headers
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
JoinLongFieldEncodingStrategy directCountEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
JoinLongFieldEncodingStrategy directMemoryUsedEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
JoinLongFieldEncodingStrategy mappedCountEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
JoinLongFieldEncodingStrategy mappedMemoryUsedEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
// decode values
List<JoinLongFieldBo> directCountList = this.codec.decodeValues(valueBuffer, directCountEncodingStrategy, numValues);
List<JoinLongFieldBo> directMemoryUsedList = this.codec.decodeValues(valueBuffer, directMemoryUsedEncodingStrategy, numValues);
List<JoinLongFieldBo> mappedCountList = this.codec.decodeValues(valueBuffer, mappedCountEncodingStrategy, numValues);
List<JoinLongFieldBo> mappedMemoryUsedList = this.codec.decodeValues(valueBuffer, mappedMemoryUsedEncodingStrategy, numValues);
List<JoinStatBo> joinDirectBufferBoList = new ArrayList<>(numValues);
for (int i = 0; i < numValues; i++) {
JoinDirectBufferBo joinDirectBufferBo = new JoinDirectBufferBo();
joinDirectBufferBo.setId(id);
joinDirectBufferBo.setTimestamp(timestamps.get(i));
joinDirectBufferBo.setDirectCountJoinValue(directCountList.get(i));
joinDirectBufferBo.setDirectMemoryUsedJoinValue(directMemoryUsedList.get(i));
joinDirectBufferBo.setMappedCountJoinValue(mappedCountList.get(i));
joinDirectBufferBo.setMappedMemoryUsedJoinValue(mappedMemoryUsedList.get(i));
joinDirectBufferBoList.add(joinDirectBufferBo);
}
return joinDirectBufferBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class CpuLoadCodec method decodeValues.
@Override
public List<JoinStatBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {
final String id = decodingContext.getApplicationId();
final long baseTimestamp = decodingContext.getBaseTimestamp();
final long timestampDelta = decodingContext.getTimestampDelta();
final long initialTimestamp = baseTimestamp + timestampDelta;
int numValues = valueBuffer.readVInt();
List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);
// decode headers
final byte[] header = valueBuffer.readPrefixedBytes();
AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);
JoinLongFieldEncodingStrategy jvmCpuLoadEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
JoinLongFieldEncodingStrategy systemCpuLoadEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());
// decode values
final List<JoinLongFieldBo> jvmCpuLoadList = this.codec.decodeValues(valueBuffer, jvmCpuLoadEncodingStrategy, numValues);
final List<JoinLongFieldBo> systemCpuLoadList = this.codec.decodeValues(valueBuffer, systemCpuLoadEncodingStrategy, numValues);
List<JoinStatBo> joinCpuLoadBoList = new ArrayList<>(numValues);
for (int i = 0; i < numValues; i++) {
JoinCpuLoadBo joinCpuLoadBo = new JoinCpuLoadBo();
joinCpuLoadBo.setId(id);
joinCpuLoadBo.setTimestamp(timestamps.get(i));
joinCpuLoadBo.setJvmCpuLoadJoinValue(jvmCpuLoadList.get(i).toLongFieldBo());
joinCpuLoadBo.setSystemCpuLoadJoinValue(systemCpuLoadList.get(i).toLongFieldBo());
joinCpuLoadBoList.add(joinCpuLoadBo);
}
return joinCpuLoadBoList;
}
Aggregations