use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class ThriftDeadlockThreadCountBoMapper method map.
@Override
public void map(AgentStatBo.Builder.StatBuilder agentStatBuilder, TAgentStat tAgentStat) {
// deadlock
if (tAgentStat.isSetDeadlock()) {
DeadlockThreadCountBo deadlockThreadCountBo = this.map(tAgentStat.getDeadlock());
agentStatBuilder.addDeadlockThreadCount(deadlockThreadCountBo);
}
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class AgentWarningStatServiceTest method createMockData.
private List<DeadlockThreadCountBo> createMockData(int mockSize, long interval) {
long timestamp = ThreadLocalRandom.current().nextLong(START_TIME, CURRENT_TIME);
List<DeadlockThreadCountBo> deadlockThreadCountBoList = new ArrayList<>(mockSize);
for (int i = 0; i < mockSize; i++) {
DeadlockThreadCountBo deadlockThreadCountBo = new DeadlockThreadCountBo();
deadlockThreadCountBo.setAgentId("pinpoint");
deadlockThreadCountBo.setStartTimestamp(START_TIME);
deadlockThreadCountBo.setTimestamp(timestamp + (i * interval));
deadlockThreadCountBoList.add(deadlockThreadCountBo);
}
return deadlockThreadCountBoList;
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class AgentWarningStatServiceTest method selectTest1.
@Test
public void selectTest1() {
Range range = Range.newRange(CURRENT_TIME - TIME, CURRENT_TIME);
List<DeadlockThreadCountBo> mockData = createMockData(10, 5000);
when(deadlockDao.getAgentStatList("pinpoint", range)).thenReturn(mockData);
List<AgentStatusTimelineSegment> timelineSegmentList = agentWarningStatService.select("pinpoint", range);
Assert.assertEquals(1, timelineSegmentList.size());
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class GrpcDeadlockThreadCountBoMapper method map.
@Override
public void map(AgentStatBo.Builder.StatBuilder builder, PAgentStat agentStat) {
// deadlock
if (agentStat.hasDeadlock()) {
final PDeadlock deadlock = agentStat.getDeadlock();
final DeadlockThreadCountBo deadlockThreadCountBo = this.map(deadlock);
builder.addDeadlockThreadCount(deadlockThreadCountBo);
}
}
use of com.navercorp.pinpoint.common.server.bo.stat.DeadlockThreadCountBo in project pinpoint by naver.
the class GrpcDeadlockThreadCountBoMapper method map.
public DeadlockThreadCountBo map(final PDeadlock tDeadlock) {
final DeadlockThreadCountBo deadlockThreadCountBo = new DeadlockThreadCountBo();
deadlockThreadCountBo.setDeadlockedThreadCount(tDeadlock.getCount());
return deadlockThreadCountBo;
}
Aggregations