Search in sources :

Example 1 with TitledDataPoint

use of com.navercorp.pinpoint.web.vo.chart.TitledDataPoint in project pinpoint by naver.

the class LegacyAgentStatChartGroup method addActiveTraceData.

private void addActiveTraceData(AgentStat agentStat) {
    long timestamp = agentStat.getTimestamp();
    HistogramSchema schema = agentStat.getHistogramSchema();
    if (schema != null) {
        Map<SlotType, Integer> activeTraceCounts = agentStat.getActiveTraceCounts();
        int fastCount = activeTraceCounts.get(SlotType.FAST);
        if (fastCount != UNCOLLECTED_DATA) {
            TitledDataPoint<Long, Integer> fastDataPoint = new TitledDataPoint<>(schema.getFastSlot().getSlotName(), timestamp, fastCount);
            this.activeTraceFastChartBuilder.addDataPoint(fastDataPoint);
        }
        int normalCount = activeTraceCounts.get(SlotType.NORMAL);
        if (normalCount != UNCOLLECTED_DATA) {
            TitledDataPoint<Long, Integer> normalDataPoint = new TitledDataPoint<>(schema.getNormalSlot().getSlotName(), timestamp, normalCount);
            this.activeTraceNormalChartBuilder.addDataPoint(normalDataPoint);
        }
        int slowCount = activeTraceCounts.get(SlotType.SLOW);
        if (slowCount != UNCOLLECTED_DATA) {
            TitledDataPoint<Long, Integer> slowDataPoint = new TitledDataPoint<>(schema.getSlowSlot().getSlotName(), timestamp, slowCount);
            this.activeTraceSlowChartBuilder.addDataPoint(slowDataPoint);
        }
        int verySlowCount = activeTraceCounts.get(SlotType.VERY_SLOW);
        if (verySlowCount != UNCOLLECTED_DATA) {
            TitledDataPoint<Long, Integer> verySlowDataPoint = new TitledDataPoint<>(schema.getVerySlowSlot().getSlotName(), timestamp, verySlowCount);
            this.activeTraceVerySlowChartBuilder.addDataPoint(verySlowDataPoint);
        }
    }
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) TitledDataPoint(com.navercorp.pinpoint.web.vo.chart.TitledDataPoint) DataPoint(com.navercorp.pinpoint.web.vo.chart.DataPoint) SlotType(com.navercorp.pinpoint.common.trace.SlotType) TitledDataPoint(com.navercorp.pinpoint.web.vo.chart.TitledDataPoint)

Aggregations

HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)1 SlotType (com.navercorp.pinpoint.common.trace.SlotType)1 DataPoint (com.navercorp.pinpoint.web.vo.chart.DataPoint)1 TitledDataPoint (com.navercorp.pinpoint.web.vo.chart.TitledDataPoint)1