Search in sources :

Example 11 with JoinTransactionBo

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));
}
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)

Example 12 with JoinTransactionBo

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));
}
Also used : JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Aggregations

JoinTransactionBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo)12 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)7 ArrayList (java.util.ArrayList)5 Test (org.junit.Test)4 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)3 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)3 TFTransaction (com.navercorp.pinpoint.thrift.dto.flink.TFTransaction)3 AggreJoinTransactionBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinTransactionBo)3 AgentStatHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderDecoder)1 BitCountingHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderDecoder)1 JoinLongFieldEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinLongFieldEncodingStrategy)1 JoinLongFieldStrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinLongFieldStrategyAnalyzer)1 StrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.StrategyAnalyzer)1 UnsignedLongEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.UnsignedLongEncodingStrategy)1 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)1 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)1