use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo 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.common.server.bo.stat.join.JoinTransactionBo 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));
}
Aggregations