use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class TBaseFlatMapperTest method assertJoinTransactionBo.
private void assertJoinTransactionBo(List<JoinTransactionBo> joinTransactionBoList) {
assertEquals(2, joinTransactionBoList.size());
JoinTransactionBo joinTransactionBo = joinTransactionBoList.get(0);
assertEquals(joinTransactionBo.getId(), AGENT_ID);
assertEquals(joinTransactionBo.getTimestamp(), 1491274143454L);
assertEquals(joinTransactionBo.getCollectInterval(), 5000);
assertEquals(joinTransactionBo.getTotalCountJoinValue(), new JoinLongFieldBo(120L, 120L, AGENT_ID, 120L, AGENT_ID));
JoinTransactionBo joinTransactionBo2 = joinTransactionBoList.get(1);
assertEquals(joinTransactionBo2.getId(), AGENT_ID);
assertEquals(joinTransactionBo2.getTimestamp(), 1491274148454L);
assertEquals(joinTransactionBo2.getCollectInterval(), 5000);
assertEquals(joinTransactionBo2.getTotalCountJoinValue(), new JoinLongFieldBo(124L, 124L, AGENT_ID, 124L, AGENT_ID));
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class JoinFileDescriptorBoMapper method map.
@Override
public JoinFileDescriptorBo map(TFAgentStat tFAgentStat) {
if (!tFAgentStat.isSetFileDescriptor()) {
return JoinFileDescriptorBo.EMPTY_JOIN_FILE_DESCRIPTOR_BO;
}
JoinFileDescriptorBo joinFileDescriptorBo = new JoinFileDescriptorBo();
final String agentId = tFAgentStat.getAgentId();
joinFileDescriptorBo.setId(agentId);
joinFileDescriptorBo.setTimestamp(tFAgentStat.getTimestamp());
TFFileDescriptor tFFileDescriptor = tFAgentStat.getFileDescriptor();
final long openFileDescriptorCount = tFFileDescriptor.getOpenFileDescriptorCount();
joinFileDescriptorBo.setOpenFdCountJoinValue(new JoinLongFieldBo(openFileDescriptorCount, openFileDescriptorCount, agentId, openFileDescriptorCount, agentId));
return joinFileDescriptorBo;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class JoinTotalThreadCountBoMapper method map.
@Override
public JoinTotalThreadCountBo map(TFAgentStat tFAgentStat) {
if (!tFAgentStat.isSetTotalThreadCount()) {
return JoinTotalThreadCountBo.EMPTY_TOTAL_THREAD_COUNT_BO;
}
JoinTotalThreadCountBo joinTotalThreadCountBo = new JoinTotalThreadCountBo();
final String agentId = tFAgentStat.getAgentId();
final long totalThreadCount = tFAgentStat.getTotalThreadCount().getTotalThreadCount();
joinTotalThreadCountBo.setId(agentId);
joinTotalThreadCountBo.setTimestamp(tFAgentStat.getTimestamp());
joinTotalThreadCountBo.setTotalThreadCountJoinValue(new JoinLongFieldBo(totalThreadCount, totalThreadCount, agentId, totalThreadCount, agentId));
return joinTotalThreadCountBo;
}
use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.
the class JoinFileDescriptorSamplerTest method sampleDataPoints.
@Test
public void sampleDataPoints() throws Exception {
JoinFileDescriptorSampler joinFileDescriptorSampler = new JoinFileDescriptorSampler();
List<JoinFileDescriptorBo> joinFileDescriptorBoList = new ArrayList<>(5);
long timeStamp = new Date().getTime();
joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", timeStamp + 5000));
joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", timeStamp + 10000));
joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 33, 39, "agent3_1", 90, "agent3_2", timeStamp + 15000));
joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", timeStamp + 20000));
joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", timeStamp + 25000));
AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo = joinFileDescriptorSampler.sampleDataPoints(0, new Date().getTime(), joinFileDescriptorBoList, new JoinFileDescriptorBo());
assertEquals(aggreJoinFileDescriptorBo.getId(), "testApp");
assertEquals(aggreJoinFileDescriptorBo.getOpenFdCountJoinValue(), new JoinLongFieldBo(33L, 10L, "agent2_2", 60L, "agent1_1"));
}
Aggregations