use of com.navercorp.pinpoint.thrift.dto.flink.TFTransaction 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));
}
Aggregations