use of com.navercorp.pinpoint.common.server.bo.codec.strategy.EncodingStrategy in project pinpoint by naver.
the class EncodingStrategyTestBase method getBufferSizes.
private Map<EncodingStrategy<T>, Integer> getBufferSizes(List<T> values) {
Map<EncodingStrategy<T>, Integer> bufferSizes = new HashMap<>();
for (EncodingStrategy<T> strategy : getEncodingStrategies()) {
Buffer encodedBuffer = new AutomaticBuffer();
codec.encodeValues(encodedBuffer, strategy, values);
int encodedBufferSize = encodedBuffer.getBuffer().length;
bufferSizes.put(strategy, encodedBufferSize);
}
logger.debug("Strategies : {}", bufferSizes);
return bufferSizes;
}
Aggregations