Search in sources :

Example 6 with TFResponseTime

use of com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime 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 7 with TFResponseTime

use of com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime 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

TFResponseTime (com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime)7 Test (org.junit.Test)5 JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)4 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)4 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)3 AgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo)1 ResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.ResponseTimeBo)1 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)1 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)1 ArrayList (java.util.ArrayList)1