Search in sources :

Example 1 with SampledDeadlock

use of com.navercorp.pinpoint.web.vo.stat.SampledDeadlock in project pinpoint by naver.

the class DeadlockChartGroupTest method assertEquals.

private void assertEquals(List<SampledDeadlock> sampledDeadlockList, StatChartGroup deadlockChartGroup) {
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = deadlockChartGroup.getCharts();
    Chart deadlockCountChart = charts.get(DeadlockChart.DeadlockChartGroup.DeadlockChartType.DEADLOCK_COUNT);
    List<Point> deadlockCountChartPointList = deadlockCountChart.getPoints();
    for (int i = 0; i < sampledDeadlockList.size(); i++) {
        SampledDeadlock sampledDeadlock = sampledDeadlockList.get(i);
        Point point = sampledDeadlock.getDeadlockedThreadCount();
        Assert.assertEquals(deadlockCountChartPointList.get(i), point);
    }
}
Also used : SampledDeadlock(com.navercorp.pinpoint.web.vo.stat.SampledDeadlock) Point(com.navercorp.pinpoint.web.vo.chart.Point) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Point(com.navercorp.pinpoint.web.vo.chart.Point)

Example 2 with SampledDeadlock

use of com.navercorp.pinpoint.web.vo.stat.SampledDeadlock in project pinpoint by naver.

the class DeadlockSampler method sampleDataPoints.

@Override
public SampledDeadlock sampleDataPoints(int index, long timestamp, List<DeadlockThreadCountBo> deadlockThreadCountBoList, DeadlockThreadCountBo previousDataPoint) {
    List<Integer> deadlockedThreadCountList = filter(deadlockThreadCountBoList);
    AgentStatPoint<Integer> point = createPoint(timestamp, deadlockedThreadCountList);
    SampledDeadlock sampledDeadlock = new SampledDeadlock(point);
    return sampledDeadlock;
}
Also used : SampledDeadlock(com.navercorp.pinpoint.web.vo.stat.SampledDeadlock)

Example 3 with SampledDeadlock

use of com.navercorp.pinpoint.web.vo.stat.SampledDeadlock in project pinpoint by naver.

the class DeadlockChartGroupTest method basicFunctionTest1.

@Test
public void basicFunctionTest1() throws Exception {
    long currentTimeMillis = System.currentTimeMillis();
    TimeWindow timeWindow = new TimeWindow(Range.newRange(currentTimeMillis - 300000, currentTimeMillis));
    List<SampledDeadlock> sampledDeadlockList = createSampledResponseTimeList(timeWindow);
    StatChartGroup deadlockChartGroup = new DeadlockChart.DeadlockChartGroup(timeWindow, sampledDeadlockList);
    assertEquals(sampledDeadlockList, deadlockChartGroup);
}
Also used : StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) SampledDeadlock(com.navercorp.pinpoint.web.vo.stat.SampledDeadlock) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) Test(org.junit.Test)

Example 4 with SampledDeadlock

use of com.navercorp.pinpoint.web.vo.stat.SampledDeadlock in project pinpoint by naver.

the class HbaseSampledDeadlockDaoV2 method getSampledAgentStatList.

@Override
public List<SampledDeadlock> getSampledAgentStatList(String agentId, TimeWindow timeWindow) {
    long scanFrom = timeWindow.getWindowRange().getFrom();
    long scanTo = timeWindow.getWindowRange().getTo() + timeWindow.getWindowSlotSize();
    Range range = Range.newRange(scanFrom, scanTo);
    AgentStatMapperV2<DeadlockThreadCountBo> mapper = operations.createRowMapper(deadlockDecoder, range);
    SampledAgentStatResultExtractor<DeadlockThreadCountBo, SampledDeadlock> resultExtractor = new SampledAgentStatResultExtractor<>(timeWindow, mapper, deadlockSampler);
    return operations.getSampledAgentStatList(AgentStatType.DEADLOCK, resultExtractor, agentId, range);
}
Also used : SampledAgentStatResultExtractor(com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor) SampledDeadlock(com.navercorp.pinpoint.web.vo.stat.SampledDeadlock) DeadlockThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo) Range(com.navercorp.pinpoint.web.vo.Range)

Aggregations

SampledDeadlock (com.navercorp.pinpoint.web.vo.stat.SampledDeadlock)4 DeadlockThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo)1 SampledAgentStatResultExtractor (com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor)1 TimeWindow (com.navercorp.pinpoint.web.util.TimeWindow)1 Range (com.navercorp.pinpoint.web.vo.Range)1 Chart (com.navercorp.pinpoint.web.vo.chart.Chart)1 Point (com.navercorp.pinpoint.web.vo.chart.Point)1 StatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup)1 Test (org.junit.Test)1