Search in sources :

Example 11 with BitCountingHeaderEncoder

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());
}
Also used : AgentStatHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder) BitCountingHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)

Example 12 with BitCountingHeaderEncoder

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());
}
Also used : AgentStatHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder) BitCountingHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)

Example 13 with BitCountingHeaderEncoder

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());
}
Also used : AgentStatHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder) BitCountingHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)

Example 14 with BitCountingHeaderEncoder

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());
}
Also used : AgentStatHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder) BitCountingHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)

Example 15 with BitCountingHeaderEncoder

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());
}
Also used : AgentStatHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder) BitCountingHeaderEncoder(com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)

Aggregations

AgentStatHeaderEncoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderEncoder)21 BitCountingHeaderEncoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder)21 JoinIntFieldStrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinIntFieldStrategyAnalyzer)1 StrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.StrategyAnalyzer)1 StringEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.StringEncodingStrategy)1 UnsignedShortEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.UnsignedShortEncodingStrategy)1 JoinDataSourceBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceBo)1