use of com.navercorp.pinpoint.common.trace.HistogramSchema in project pinpoint by naver.
the class HistogramSchemaTest method testFindHistogramSlot.
@Test
public void testFindHistogramSlot() throws Exception {
HistogramSchema histogramSchema = ServiceType.STAND_ALONE.getHistogramSchema();
Assert.assertEquals(histogramSchema.findHistogramSlot(999, false).getSlotTime(), 1000);
Assert.assertEquals(histogramSchema.findHistogramSlot(1000, false).getSlotTime(), 1000);
Assert.assertEquals(histogramSchema.findHistogramSlot(1111, false).getSlotTime(), 3000);
}
use of com.navercorp.pinpoint.common.trace.HistogramSchema in project pinpoint by naver.
the class ApplicationMapStatisticsUtils method findResponseHistogramSlotNo.
private static short findResponseHistogramSlotNo(ServiceType serviceType, int elapsed, boolean isError) {
if (serviceType == null) {
throw new NullPointerException("serviceType must not be null");
}
final HistogramSchema histogramSchema = serviceType.getHistogramSchema();
final HistogramSlot histogramSlot = histogramSchema.findHistogramSlot(elapsed, isError);
return histogramSlot.getSlotTime();
}
use of com.navercorp.pinpoint.common.trace.HistogramSchema in project pinpoint by naver.
the class ApplicationTimeHistogram method createViewModel.
public List<ResponseTimeViewModel> createViewModel() {
final List<ResponseTimeViewModel> value = new ArrayList<>(5);
ServiceType serviceType = application.getServiceType();
HistogramSchema schema = serviceType.getHistogramSchema();
value.add(new ResponseTimeViewModel(schema.getFastSlot().getSlotName(), getColumnValue(SlotType.FAST)));
// value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR)));
value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL)));
// value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR)));
value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW)));
// value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR)));
value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW)));
// value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR)));
value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR)));
return value;
}
use of com.navercorp.pinpoint.common.trace.HistogramSchema in project pinpoint by naver.
the class ActiveTraceSampler method sampleDataPoints.
@Override
public SampledActiveTrace sampleDataPoints(int timeWindowIndex, long timestamp, List<ActiveTraceBo> dataPoints, ActiveTraceBo previousDataPoint) {
final HistogramSchema schema = BaseHistogramSchema.getDefaultHistogramSchemaByTypeCode(dataPoints.get(0).getHistogramSchemaType());
if (schema == null) {
return newUnSampledActiveTrace(timestamp);
}
AgentStatPoint<Integer> fast = newAgentStatPoint(schema.getFastSlot(), timestamp, dataPoints, ActiveTraceHistogram::getFastCount);
AgentStatPoint<Integer> normal = newAgentStatPoint(schema.getNormalSlot(), timestamp, dataPoints, ActiveTraceHistogram::getNormalCount);
AgentStatPoint<Integer> slow = newAgentStatPoint(schema.getSlowSlot(), timestamp, dataPoints, ActiveTraceHistogram::getSlowCount);
AgentStatPoint<Integer> verySlow = newAgentStatPoint(schema.getVerySlowSlot(), timestamp, dataPoints, ActiveTraceHistogram::getVerySlowCount);
SampledActiveTrace sampledActiveTrace = new SampledActiveTrace(fast, normal, slow, verySlow);
return sampledActiveTrace;
}
use of com.navercorp.pinpoint.common.trace.HistogramSchema in project pinpoint by naver.
the class FilteredMapBuilder method getHistogramSlotTime.
private short getHistogramSlotTime(boolean hasException, int elapsedTime, ServiceType serviceType) {
final HistogramSchema schema = serviceType.getHistogramSchema();
final HistogramSlot histogramSlot = schema.findHistogramSlot(elapsedTime, hasException);
return histogramSlot.getSlotTime();
}
Aggregations