Search in sources :

Example 1 with HistogramSchema

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);
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) Test(org.junit.Test)

Example 2 with HistogramSchema

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();
}
Also used : HistogramSlot(com.navercorp.pinpoint.common.trace.HistogramSlot) HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema)

Example 3 with HistogramSchema

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;
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel)

Example 4 with HistogramSchema

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;
}
Also used : BaseHistogramSchema(com.navercorp.pinpoint.common.trace.BaseHistogramSchema) HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) ActiveTraceHistogram(com.navercorp.pinpoint.common.server.bo.stat.ActiveTraceHistogram) SampledActiveTrace(com.navercorp.pinpoint.web.vo.stat.SampledActiveTrace)

Example 5 with HistogramSchema

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();
}
Also used : HistogramSlot(com.navercorp.pinpoint.common.trace.HistogramSlot) HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema)

Aggregations

HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)22 Test (org.junit.Test)8 HistogramSlot (com.navercorp.pinpoint.common.trace.HistogramSlot)4 CallRowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallRowKey)3 ColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName)3 RowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.RowKey)3 Histogram (com.navercorp.pinpoint.web.applicationmap.histogram.Histogram)3 ResponseTimeViewModel (com.navercorp.pinpoint.web.view.ResponseTimeViewModel)3 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)2 BaseHistogramSchema (com.navercorp.pinpoint.common.trace.BaseHistogramSchema)2 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)2 HistogramSnapshot (com.navercorp.pinpoint.profiler.monitor.metric.rpc.HistogramSnapshot)2 AgentResponseTimeViewModel (com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel)2 Application (com.navercorp.pinpoint.web.vo.Application)2 CalleeColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName)1 CallerColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName)1 ResponseColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName)1 SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)1 ActiveTraceHistogram (com.navercorp.pinpoint.common.server.bo.stat.ActiveTraceHistogram)1 SlotType (com.navercorp.pinpoint.common.trace.SlotType)1