use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinLoadedClassBoMapperTest method map2Test.
@Test
public void map2Test() {
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
final JoinLoadedClassBoMapper mapper = new JoinLoadedClassBoMapper();
final JoinLoadedClassBo joinLoadedClassBo = mapper.map(tFAgentStat);
assertEquals(joinLoadedClassBo, joinLoadedClassBo.EMPTY_JOIN_LOADED_CLASS_BO);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinLoadedClassBoMapperTest method mapTest.
@Test
public void mapTest() throws Exception {
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
final TFLoadedClass tfLoadedClass = new TFLoadedClass();
tfLoadedClass.setLoadedClassCount(50);
tfLoadedClass.setUnloadedClassCount(50);
tFAgentStat.setLoadedClass(tfLoadedClass);
final JoinLoadedClassBoMapper mapper = new JoinLoadedClassBoMapper();
final JoinLoadedClassBo joinLoadedClassBo = mapper.map(tFAgentStat);
assertNotNull(joinLoadedClassBo);
assertEquals("testAgent", joinLoadedClassBo.getId());
assertEquals(1491274138454L, joinLoadedClassBo.getTimestamp());
assertEquals(new JoinLongFieldBo(50L, 50L, "testAgent", 50L, "testAgent"), joinLoadedClassBo.getLoadedClassJoinValue());
assertEquals(new JoinLongFieldBo(50L, 50L, "testAgent", 50L, "testAgent"), joinLoadedClassBo.getUnloadedClassJoinValue());
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinThriftCpuLoadBoMapperTest method map2Test.
@Test
public void map2Test() {
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
final JoinCpuLoadBoMapper mapper = new JoinCpuLoadBoMapper();
final JoinCpuLoadBo joinCpuLoadBo = mapper.map(tFAgentStat);
assertEquals(joinCpuLoadBo, joinCpuLoadBo.EMPTY_JOIN_CPU_LOAD_BO);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinTransactionBoMapperTest method map2Test.
@Test
public void map2Test() {
final TFAgentStat tFAgentStat = new TFAgentStat();
final String id = "testAgent";
tFAgentStat.setAgentId(id);
tFAgentStat.setTimestamp(1491274138454L);
tFAgentStat.setCollectInterval(5000);
final JoinTransactionBoMapper joinTransactionBoMapper = new JoinTransactionBoMapper();
final JoinTransactionBo joinTransactionBo = joinTransactionBoMapper.map(tFAgentStat);
assertEquals(joinTransactionBo, JoinTransactionBo.EMPTY_JOIN_TRANSACTION_BO);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class TFAgentStatMapperTest method map8Test.
@Test
public void map8Test() {
AgentStatBo agentStatBo = createLoadedClassCountBoList();
List<TFAgentStat> tFAgentStatList = newAgentStatMapper().map(agentStatBo);
assertEquals(3, tFAgentStatList.size());
TFAgentStat tFAgentStat1 = tFAgentStatList.get(0);
assertEquals(TEST_AGENT, tFAgentStat1.getAgentId());
assertEquals(startTimestamp, tFAgentStat1.getStartTimestamp());
assertEquals(collectTime1st, tFAgentStat1.getTimestamp());
assertEquals(4, tFAgentStat1.getLoadedClass().getLoadedClassCount(), 0);
assertEquals(4, tFAgentStat1.getLoadedClass().getUnloadedClassCount(), 0);
TFAgentStat tFAgentStat2 = tFAgentStatList.get(1);
assertEquals(TEST_AGENT, tFAgentStat2.getAgentId());
assertEquals(startTimestamp, tFAgentStat2.getStartTimestamp());
assertEquals(collectTime2nd, tFAgentStat2.getTimestamp());
assertEquals(5, tFAgentStat2.getLoadedClass().getLoadedClassCount(), 0);
assertEquals(5, tFAgentStat2.getLoadedClass().getUnloadedClassCount(), 0);
TFAgentStat tFAgentStat3 = tFAgentStatList.get(2);
assertEquals(TEST_AGENT, tFAgentStat3.getAgentId());
assertEquals(startTimestamp, tFAgentStat3.getStartTimestamp());
assertEquals(collectTime3rd, tFAgentStat3.getTimestamp());
assertEquals(6, tFAgentStat3.getLoadedClass().getLoadedClassCount(), 0);
assertEquals(6, tFAgentStat3.getLoadedClass().getUnloadedClassCount(), 0);
}
Aggregations