Search in sources :

Example 11 with JoinResponseTimeBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo in project pinpoint by naver.

the class JoinResponseTimeBoMapperTest method map2Test.

@Test
public void map2Test() {
    final String agentId = "agentId";
    final TFResponseTime tFResponseTime = new TFResponseTime();
    tFResponseTime.setAvg(100);
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId(agentId);
    tFAgentStat.setTimestamp(1491274148454L);
    JoinResponseTimeBoMapper mapper = new JoinResponseTimeBoMapper();
    JoinResponseTimeBo joinResponseTimeBo = mapper.map(tFAgentStat);
    assertEquals(joinResponseTimeBo, JoinResponseTimeBo.EMPTY_JOIN_RESPONSE_TIME_BO);
}
Also used : JoinResponseTimeBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) TFResponseTime(com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime) Test(org.junit.Test)

Example 12 with JoinResponseTimeBo

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

Aggregations

JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)12 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)7 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)5 TFResponseTime (com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime)4 AggreJoinResponseTimeBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo)4 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)3 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)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 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)1 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)1