Search in sources :

Example 6 with TFTransaction

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));
}
Also used : TFTransaction(com.navercorp.pinpoint.thrift.dto.flink.TFTransaction) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Aggregations

TFTransaction (com.navercorp.pinpoint.thrift.dto.flink.TFTransaction)6 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)3 JoinTransactionBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo)3 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)3 Test (org.junit.Test)3 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)2 ArrayList (java.util.ArrayList)2 TransactionBo (com.navercorp.pinpoint.common.server.bo.stat.TransactionBo)1 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)1