use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinResponseTimeBoMapperTest method mapTest.
@Test
public void mapTest() {
final String agentId = "agentId";
final TFResponseTime tFResponseTime = new TFResponseTime();
tFResponseTime.setAvg(100);
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId(agentId);
tFAgentStat.setTimestamp(1491274148454L);
tFAgentStat.setResponseTime(tFResponseTime);
JoinResponseTimeBoMapper mapper = new JoinResponseTimeBoMapper();
JoinResponseTimeBo joinResponseTimeBo = mapper.map(tFAgentStat);
assertEquals(joinResponseTimeBo.getId(), agentId);
assertEquals(joinResponseTimeBo.getTimestamp(), 1491274148454L);
assertEquals(joinResponseTimeBo.getResponseTimeJoinValue(), new JoinLongFieldBo(100L, 100L, agentId, 100L, agentId));
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinThriftCpuLoadBoMapperTest method mapTest.
@Test
public void mapTest() throws Exception {
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
final TFCpuLoad tfCpuLoad = new TFCpuLoad();
tfCpuLoad.setJvmCpuLoad(10);
tfCpuLoad.setSystemCpuLoad(30);
tFAgentStat.setCpuLoad(tfCpuLoad);
final JoinCpuLoadBoMapper mapper = new JoinCpuLoadBoMapper();
final JoinCpuLoadBo joinCpuLoadBo = mapper.map(tFAgentStat);
assertNotNull(joinCpuLoadBo);
assertEquals(joinCpuLoadBo.getId(), "testAgent");
assertEquals(joinCpuLoadBo.getTimestamp(), 1491274138454L);
final JoinDoubleFieldBo jvmCpuLoadJoinValue = joinCpuLoadBo.getJvmCpuLoadJoinValue();
assertEquals(jvmCpuLoadJoinValue.getAvg(), 10, 0);
assertEquals(jvmCpuLoadJoinValue.getMin(), 10, 0);
assertEquals(jvmCpuLoadJoinValue.getMax(), 10, 0);
final JoinDoubleFieldBo systemCpuLoadJoinValue = joinCpuLoadBo.getSystemCpuLoadJoinValue();
assertEquals(systemCpuLoadJoinValue.getAvg(), 30, 0);
assertEquals(systemCpuLoadJoinValue.getMin(), 30, 0);
assertEquals(systemCpuLoadJoinValue.getMax(), 30, 0);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinTransactionBoMapperTest method mapTest.
@Test
public void mapTest() throws Exception {
final TFAgentStat tFAgentStat = new TFAgentStat();
final String id = "testAgent";
tFAgentStat.setAgentId(id);
tFAgentStat.setTimestamp(1491274138454L);
tFAgentStat.setCollectInterval(5000);
final TFTransaction tFTransaction = new TFTransaction();
tFTransaction.setSampledNewCount(10);
tFTransaction.setSampledContinuationCount(20);
tFTransaction.setUnsampledNewCount(40);
tFTransaction.setUnsampledContinuationCount(50);
tFTransaction.setSkippedNewCount(60);
tFTransaction.setSkippedContinuationCount(70);
tFAgentStat.setTransaction(tFTransaction);
final JoinTransactionBoMapper joinTransactionBoMapper = new JoinTransactionBoMapper();
final JoinTransactionBo joinTransactionBo = joinTransactionBoMapper.map(tFAgentStat);
assertNotNull(joinTransactionBo);
assertEquals(joinTransactionBo.getId(), id);
assertEquals(joinTransactionBo.getTimestamp(), 1491274138454L);
assertEquals(joinTransactionBo.getCollectInterval(), 5000);
assertEquals(joinTransactionBo.getTotalCountJoinValue(), new JoinLongFieldBo(250L, 250L, id, 250L, id));
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinDataSourceListBoMapperTest method map2Test.
@Test
public void map2Test() {
JoinDataSourceListBoMapper mapper = new JoinDataSourceListBoMapper();
TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
JoinDataSourceListBo joinDataSourceListBo = mapper.map(tFAgentStat);
assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
TFDataSourceList tFDataSourceList = new TFDataSourceList();
tFAgentStat.setDataSourceList(tFDataSourceList);
joinDataSourceListBo = mapper.map(tFAgentStat);
assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
List<TFDataSource> dataSourceList = new ArrayList<>();
tFDataSourceList.setDataSourceList(dataSourceList);
joinDataSourceListBo = mapper.map(tFAgentStat);
assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat in project pinpoint by naver.
the class JoinFileDescriptorBoMapperTest method map2Test.
@Test
public void map2Test() {
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId("testAgent");
tFAgentStat.setTimestamp(1491274138454L);
final JoinFileDescriptorBoMapper mapper = new JoinFileDescriptorBoMapper();
final JoinFileDescriptorBo joinFileDescriptorBo = mapper.map(tFAgentStat);
assertEquals(joinFileDescriptorBo, joinFileDescriptorBo.EMPTY_JOIN_FILE_DESCRIPTOR_BO);
}
Aggregations