Search in sources :

Example 16 with BitCountingHeaderEncoder

use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.

the class ActiveTraceCodecV1 method encodeDataPoints.

private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Short> versionStrategyAnalyzer, StrategyAnalyzer<Integer> schemaTypeStrategyAnalyzer, StrategyAnalyzer<Integer> fastTraceCountsStrategyAnalyzer, StrategyAnalyzer<Integer> normalTraceCountsStrategyAnalyzer, StrategyAnalyzer<Integer> slowTraceCountsStrategyAnalyzer, StrategyAnalyzer<Integer> verySlowTraceCountsStrategyAnalyzer) {
    // encode header
    AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
    headerEncoder.addCode(versionStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(schemaTypeStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(fastTraceCountsStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(normalTraceCountsStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(slowTraceCountsStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(verySlowTraceCountsStrategyAnalyzer.getBestStrategy().getCode());
    final byte[] header = headerEncoder.getHeader();
    valueBuffer.putPrefixedBytes(header);
    // encode values
    this.codec.encodeValues(valueBuffer, versionStrategyAnalyzer.getBestStrategy(), versionStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, schemaTypeStrategyAnalyzer.getBestStrategy(), schemaTypeStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, fastTraceCountsStrategyAnalyzer.getBestStrategy(), fastTraceCountsStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, normalTraceCountsStrategyAnalyzer.getBestStrategy(), normalTraceCountsStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, slowTraceCountsStrategyAnalyzer.getBestStrategy(), slowTraceCountsStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, verySlowTraceCountsStrategyAnalyzer.getBestStrategy(), verySlowTraceCountsStrategyAnalyzer.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 17 with BitCountingHeaderEncoder

use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.

the class TransactionCodecV1 method encodeDataPoints.

private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Long> collectIntervalStrategyAnalyzer, StrategyAnalyzer<Long> sampledNewCountStrategyAnalyzer, StrategyAnalyzer<Long> sampledContinuationCountStrategyAnalyzer, StrategyAnalyzer<Long> unsampledNewCountStrategyAnalyzer, StrategyAnalyzer<Long> unsampledContinuationCountStrategyAnalyzer) {
    // encode header
    AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
    headerEncoder.addCode(collectIntervalStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(sampledNewCountStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(sampledContinuationCountStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(unsampledNewCountStrategyAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(unsampledContinuationCountStrategyAnalyzer.getBestStrategy().getCode());
    final byte[] header = headerEncoder.getHeader();
    valueBuffer.putPrefixedBytes(header);
    // encode values
    this.codec.encodeValues(valueBuffer, collectIntervalStrategyAnalyzer.getBestStrategy(), collectIntervalStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, sampledNewCountStrategyAnalyzer.getBestStrategy(), sampledNewCountStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, sampledContinuationCountStrategyAnalyzer.getBestStrategy(), sampledContinuationCountStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, unsampledNewCountStrategyAnalyzer.getBestStrategy(), unsampledNewCountStrategyAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, unsampledContinuationCountStrategyAnalyzer.getBestStrategy(), unsampledContinuationCountStrategyAnalyzer.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 18 with BitCountingHeaderEncoder

use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.

the class TransactionCodec method encodeDataPoints.

private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Long> collectIntervalAnalyzer, JoinLongFieldStrategyAnalyzer totalCountAnalyzer) {
    AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
    headerEncoder.addCode(collectIntervalAnalyzer.getBestStrategy().getCode());
    final byte[] codes = totalCountAnalyzer.getBestStrategy().getCodes();
    for (byte code : codes) {
        headerEncoder.addCode(code);
    }
    final byte[] header = headerEncoder.getHeader();
    valueBuffer.putPrefixedBytes(header);
    this.codec.encodeValues(valueBuffer, collectIntervalAnalyzer.getBestStrategy(), collectIntervalAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, totalCountAnalyzer.getBestStrategy(), totalCountAnalyzer.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 19 with BitCountingHeaderEncoder

use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.

the class ActiveTraceCodec method encodeDataPoints.

private void encodeDataPoints(Buffer valueBuffer, StrategyAnalyzer<Short> versionAnalyzer, StrategyAnalyzer<Integer> schemaTypeAnalyzer, JoinIntFieldStrategyAnalyzer totalCountAnalyzer) {
    AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
    headerEncoder.addCode(versionAnalyzer.getBestStrategy().getCode());
    headerEncoder.addCode(schemaTypeAnalyzer.getBestStrategy().getCode());
    final byte[] codes = totalCountAnalyzer.getBestStrategy().getCodes();
    for (byte code : codes) {
        headerEncoder.addCode(code);
    }
    final byte[] header = headerEncoder.getHeader();
    valueBuffer.putPrefixedBytes(header);
    this.codec.encodeValues(valueBuffer, versionAnalyzer.getBestStrategy(), versionAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, schemaTypeAnalyzer.getBestStrategy(), schemaTypeAnalyzer.getValues());
    this.codec.encodeValues(valueBuffer, totalCountAnalyzer.getBestStrategy(), totalCountAnalyzer.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 20 with BitCountingHeaderEncoder

use of com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderEncoder in project pinpoint by naver.

the class FileDescriptorCodec method encodeDataPoints.

private void encodeDataPoints(Buffer valueBuffer, JoinLongFieldStrategyAnalyzer openFileDescriptorCountAnalyzer) {
    // encode header
    AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();
    final byte[] codes = openFileDescriptorCountAnalyzer.getBestStrategy().getCodes();
    for (byte code : codes) {
        headerEncoder.addCode(code);
    }
    final byte[] header = headerEncoder.getHeader();
    valueBuffer.putPrefixedBytes(header);
    // encode values
    this.codec.encodeValues(valueBuffer, openFileDescriptorCountAnalyzer.getBestStrategy(), openFileDescriptorCountAnalyzer.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