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);
}
}
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;
}
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);
}
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);
}
Aggregations