use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.
the class CpuLoadCodec method encodeDataPoints.
private void encodeDataPoints(Buffer valueBuffer, JoinLongFieldStrategyAnalyzer jvmCpuLoadAnalyzer, JoinLongFieldStrategyAnalyzer systemCpuLoadAnalyzer) {
// encode header
AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
byte[] codes = jvmCpuLoadAnalyzer.getBestStrategy().getCodes();
for (byte code : codes) {
headerEncoder.addCode(code);
}
codes = systemCpuLoadAnalyzer.getBestStrategy().getCodes();
for (byte code : codes) {
headerEncoder.addCode(code);
}
final byte[] header = headerEncoder.getHeader();
valueBuffer.putPrefixedBytes(header);
// encode values
this.codec.encodeValues(valueBuffer, jvmCpuLoadAnalyzer.getBestStrategy(), jvmCpuLoadAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, systemCpuLoadAnalyzer.getBestStrategy(), systemCpuLoadAnalyzer.getValues());
}
use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.
the class LoadedClassCodec method encodeDataPoints.
private void encodeDataPoints(Buffer valueBuffer, JoinLongFieldStrategyAnalyzer loadedClassAnalyzer, JoinLongFieldStrategyAnalyzer unloadedClassAnalyzer) {
// encode header
AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
byte[] codes = loadedClassAnalyzer.getBestStrategy().getCodes();
for (byte code : codes) {
headerEncoder.addCode(code);
}
codes = unloadedClassAnalyzer.getBestStrategy().getCodes();
for (byte code : codes) {
headerEncoder.addCode(code);
}
final byte[] header = headerEncoder.getHeader();
valueBuffer.putPrefixedBytes(header);
// encode values
this.codec.encodeValues(valueBuffer, loadedClassAnalyzer.getBestStrategy(), loadedClassAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, unloadedClassAnalyzer.getBestStrategy(), unloadedClassAnalyzer.getValues());
}
use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.
the class ResponseTimeCodec method encodeDataPoints.
private void encodeDataPoints(Buffer valueBuffer, JoinLongFieldStrategyAnalyzer responseTimeAnalyzer) {
AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
final byte[] codes = responseTimeAnalyzer.getBestStrategy().getCodes();
for (byte code : codes) {
headerEncoder.addCode(code);
}
final byte[] header = headerEncoder.getHeader();
valueBuffer.putPrefixedBytes(header);
this.codec.encodeValues(valueBuffer, responseTimeAnalyzer.getBestStrategy(), responseTimeAnalyzer.getValues());
}
use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.
the class JvmGcDetailedCodecV2 method encodeDataPoints.
private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Long> gcNewCountStrategyAnalyzer, StrategyAnalyzer<Long> gcNewTimeStrategyAnalyzer, StrategyAnalyzer<Long> codeCacheUsedStrategyAnalyzer, StrategyAnalyzer<Long> newGenUsedStrategyAnalyzer, StrategyAnalyzer<Long> oldGenUsedStrategyAnalyzer, StrategyAnalyzer<Long> survivorSpaceUsedStrategyAnalyzer, StrategyAnalyzer<Long> permGenUsedStrategyAnalyzer, StrategyAnalyzer<Long> metaspaceUsedStrategyAnalyzer) {
// encode header
AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
headerEncoder.addCode(gcNewCountStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(gcNewTimeStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(codeCacheUsedStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(newGenUsedStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(oldGenUsedStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(survivorSpaceUsedStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(permGenUsedStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(metaspaceUsedStrategyAnalyzer.getBestStrategy().getCode());
final byte[] header = headerEncoder.getHeader();
valueBuffer.putPrefixedBytes(header);
// encode values
this.codec.encodeValues(valueBuffer, gcNewCountStrategyAnalyzer.getBestStrategy(), gcNewCountStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, gcNewTimeStrategyAnalyzer.getBestStrategy(), gcNewTimeStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, codeCacheUsedStrategyAnalyzer.getBestStrategy(), codeCacheUsedStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, newGenUsedStrategyAnalyzer.getBestStrategy(), newGenUsedStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, oldGenUsedStrategyAnalyzer.getBestStrategy(), oldGenUsedStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, survivorSpaceUsedStrategyAnalyzer.getBestStrategy(), survivorSpaceUsedStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, permGenUsedStrategyAnalyzer.getBestStrategy(), permGenUsedStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, metaspaceUsedStrategyAnalyzer.getBestStrategy(), metaspaceUsedStrategyAnalyzer.getValues());
}
use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.
the class CpuLoadCodecV2 method encodeDataPoints.
private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Long> jvmCpuLoadStrategyAnalyzer, StrategyAnalyzer<Long> systemCpuLoadStrategyAnalyzer) {
// encode header
AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
headerEncoder.addCode(jvmCpuLoadStrategyAnalyzer.getBestStrategy().getCode());
headerEncoder.addCode(systemCpuLoadStrategyAnalyzer.getBestStrategy().getCode());
final byte[] header = headerEncoder.getHeader();
valueBuffer.putPrefixedBytes(header);
// encode values
this.codec.encodeValues(valueBuffer, jvmCpuLoadStrategyAnalyzer.getBestStrategy(), jvmCpuLoadStrategyAnalyzer.getValues());
this.codec.encodeValues(valueBuffer, systemCpuLoadStrategyAnalyzer.getBestStrategy(), systemCpuLoadStrategyAnalyzer.getValues());
}
Aggregations