use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class DeadlockChartGroupTest method createDeadlock.
private SampledDeadlock createDeadlock(long timestamp) {
int listSize = RandomUtils.nextInt(1, RANDOM_LIST_MAX_SIZE);
int deadlockedSize = RandomUtils.nextInt(1, RANDOM_MAX_DEADLOCKED_SIZE);
List<DeadlockThreadCountBo> deadlockThreadCountBoList = new ArrayList<>(listSize);
for (int i = 0; i < listSize; i++) {
DeadlockThreadCountBo deadlockThreadCountBo = new DeadlockThreadCountBo();
deadlockThreadCountBo.setDeadlockedThreadCount(deadlockedSize + i);
deadlockThreadCountBoList.add(deadlockThreadCountBo);
}
return sampler.sampleDataPoints(0, timestamp, deadlockThreadCountBoList, null);
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class AgentWarningStatServiceTest method selectTest2.
@Test
public void selectTest2() {
Range range = Range.newRange(CURRENT_TIME - TIME, CURRENT_TIME);
List<DeadlockThreadCountBo> mockData = createMockData(10, 70000);
when(deadlockDao.getAgentStatList("pinpoint", range)).thenReturn(mockData);
List<AgentStatusTimelineSegment> timelineSegmentList = agentWarningStatService.select("pinpoint", range);
Assert.assertEquals(10, timelineSegmentList.size());
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo 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);
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class ThriftDeadlockThreadCountBoMapper method map.
@Override
public DeadlockThreadCountBo map(TDeadlock tDeadlock) {
DeadlockThreadCountBo deadlockThreadCountBo = new DeadlockThreadCountBo();
deadlockThreadCountBo.setDeadlockedThreadCount(tDeadlock.getDeadlockedThreadCount());
return deadlockThreadCountBo;
}
Aggregations