use of com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram in project pinpoint by naver.
the class ThriftActiveTraceBoMapperTest method create.
@Override
protected TActiveTrace create() {
TActiveTraceHistogram activeTraceHistogram = new TActiveTraceHistogram();
if (getRandomBoolean()) {
activeTraceHistogram.setVersion((short) 1);
} else {
activeTraceHistogram.setVersion((short) 2);
}
if (getRandomBoolean()) {
activeTraceHistogram.setHistogramSchemaType(BaseHistogramSchema.NORMAL_SCHEMA.getTypeCode());
} else {
activeTraceHistogram.setHistogramSchemaType(BaseHistogramSchema.FAST_SCHEMA.getTypeCode());
}
activeTraceHistogram.setActiveTraceCount(Arrays.asList(getRandomInteger(0, Integer.MAX_VALUE), getRandomInteger(0, Integer.MAX_VALUE), getRandomInteger(0, Integer.MAX_VALUE), getRandomInteger(0, Integer.MAX_VALUE)));
TActiveTrace activeTrace = new TActiveTrace();
activeTrace.setHistogram(activeTraceHistogram);
return activeTrace;
}
use of com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram in project pinpoint by naver.
the class StatThriftMessageConverter method convertActiveTrace.
private TActiveTrace convertActiveTrace(ActiveTraceHistogram activeTraceHistogramMetricSnapshot) {
final TActiveTrace activeTrace = new TActiveTrace();
final TActiveTraceHistogram activeTraceHistogram = new TActiveTraceHistogram();
if (activeTraceHistogramMetricSnapshot.getHistogramSchema() != null) {
activeTraceHistogram.setHistogramSchemaType(activeTraceHistogramMetricSnapshot.getHistogramSchema().getTypeCode());
}
final List<Integer> activeTraceCounts = ActiveTraceHistogramUtils.asList(activeTraceHistogramMetricSnapshot);
activeTraceHistogram.setActiveTraceCount(activeTraceCounts);
activeTrace.setHistogram(activeTraceHistogram);
return activeTrace;
}
use of com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram in project pinpoint by naver.
the class ActiveTraceBoMapper method map.
@Override
public ActiveTraceBo map(TActiveTrace tActiveTrace) {
TActiveTraceHistogram tActiveTraceHistogram = tActiveTrace.getHistogram();
Map<SlotType, Integer> activeTraceCounts = createActiveTraceCountMap(tActiveTraceHistogram.getActiveTraceCount());
ActiveTraceBo activeTraceBo = new ActiveTraceBo();
activeTraceBo.setVersion(tActiveTraceHistogram.getVersion());
activeTraceBo.setHistogramSchemaType(tActiveTraceHistogram.getHistogramSchemaType());
activeTraceBo.setActiveTraceCounts(activeTraceCounts);
return activeTraceBo;
}
use of com.navercorp.pinpoint.thrift.dto.TActiveTraceHistogram in project pinpoint by naver.
the class ThriftActiveTraceBoMapper method map.
@Override
public ActiveTraceBo map(TActiveTrace tActiveTrace) {
TActiveTraceHistogram tActiveTraceHistogram = tActiveTrace.getHistogram();
ActiveTraceHistogram activeTraceHistogram = createActiveTraceCountMap(tActiveTraceHistogram.getActiveTraceCount());
ActiveTraceBo activeTraceBo = new ActiveTraceBo();
activeTraceBo.setVersion(tActiveTraceHistogram.getVersion());
activeTraceBo.setHistogramSchemaType(tActiveTraceHistogram.getHistogramSchemaType());
activeTraceBo.setActiveTraceHistogram(activeTraceHistogram);
return activeTraceBo;
}
Aggregations