Search in sources :

Example 1 with TFTotalThreadCount

use of com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount in project pinpoint by naver.

the class TFTotalThreadCountMapper method map.

public TFTotalThreadCount map(TotalThreadCountBo totalThreadCountBo) {
    TFTotalThreadCount tFTotalThreadCount = new TFTotalThreadCount();
    tFTotalThreadCount.setTotalThreadCount(totalThreadCountBo.getTotalThreadCount());
    return tFTotalThreadCount;
}
Also used : TFTotalThreadCount(com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount)

Example 2 with TFTotalThreadCount

use of com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount in project pinpoint by naver.

the class JoinAgentStatBoMapperTest method map6Test.

@Test
public void map6Test() {
    final String agentId = "testAgent";
    final JoinAgentStatBoMapper joinAgentStatBoMapper = new JoinAgentStatBoMapper();
    final TFAgentStatBatch tFAgentStatBatch = new TFAgentStatBatch();
    tFAgentStatBatch.setStartTimestamp(1491274138454L);
    tFAgentStatBatch.setAgentId(agentId);
    final TFTotalThreadCount tfTotalThreadCount = new TFTotalThreadCount();
    tfTotalThreadCount.setTotalThreadCount(100);
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId(agentId);
    tFAgentStat.setTimestamp(1491274148454L);
    tFAgentStat.setTotalThreadCount(tfTotalThreadCount);
    final TFTotalThreadCount tfTotalThreadCount2 = new TFTotalThreadCount();
    tfTotalThreadCount2.setTotalThreadCount(120);
    final TFAgentStat tFAgentStat2 = new TFAgentStat();
    tFAgentStat2.setAgentId(agentId);
    tFAgentStat2.setTimestamp(1491275148454L);
    tFAgentStat2.setTotalThreadCount(tfTotalThreadCount2);
    final List<TFAgentStat> tFAgentStatList = new ArrayList<>(2);
    tFAgentStatList.add(tFAgentStat);
    tFAgentStatList.add(tFAgentStat2);
    tFAgentStatBatch.setAgentStats(tFAgentStatList);
    JoinAgentStatBo joinAgentStatBo = joinAgentStatBoMapper.map(tFAgentStatBatch);
    assertEquals(agentId, joinAgentStatBo.getId());
    assertEquals(1491274138454L, joinAgentStatBo.getAgentStartTimestamp());
    assertEquals(1491274148454L, joinAgentStatBo.getTimestamp());
    List<JoinTotalThreadCountBo> joinTotalThreadCountBoList = joinAgentStatBo.getJoinTotalThreadCountBoList();
    assertEquals(joinTotalThreadCountBoList.size(), 2);
    JoinTotalThreadCountBo joinTotalThreadCountBo = joinTotalThreadCountBoList.get(0);
    assertEquals(agentId, joinTotalThreadCountBo.getId());
    assertEquals(1491274148454L, joinTotalThreadCountBo.getTimestamp());
    assertEquals(new JoinLongFieldBo(100L, 100L, agentId, 100L, agentId), joinTotalThreadCountBo.getTotalThreadCountJoinValue());
    JoinTotalThreadCountBo joinTotalThreadCountBo2 = joinTotalThreadCountBoList.get(1);
    assertEquals(agentId, joinTotalThreadCountBo2.getId());
    assertEquals(1491275148454L, joinTotalThreadCountBo2.getTimestamp());
    assertEquals(new JoinLongFieldBo(120L, 120L, agentId, 120L, agentId), joinTotalThreadCountBo2.getTotalThreadCountJoinValue());
}
Also used : JoinAgentStatBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo) ArrayList(java.util.ArrayList) JoinTotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) TFTotalThreadCount(com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount) TFAgentStatBatch(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch) Test(org.junit.Test)

Example 3 with TFTotalThreadCount

use of com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount in project pinpoint by naver.

the class TFTotalThreadCountMapperTest method mapTest.

@Test
public void mapTest() {
    TFTotalThreadCountMapper mapper = new TFTotalThreadCountMapper();
    TotalThreadCountBo totalThreadCountBo = new TotalThreadCountBo();
    totalThreadCountBo.setTotalThreadCount(50);
    TFTotalThreadCount tfTotalThreadCount = mapper.map(totalThreadCountBo);
    assertEquals(tfTotalThreadCount.getTotalThreadCount(), 50);
}
Also used : TotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo) TFTotalThreadCount(com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount) Test(org.junit.Test)

Example 4 with TFTotalThreadCount

use of com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount in project pinpoint by naver.

the class JoinTotalThreadCountBoMapperTest method mapTest.

@Test
public void mapTest() throws Exception {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final TFTotalThreadCount tfTotalThreadCount = new TFTotalThreadCount();
    tfTotalThreadCount.setTotalThreadCount(50);
    tFAgentStat.setTotalThreadCount(tfTotalThreadCount);
    final JoinTotalThreadCountBoMapper mapper = new JoinTotalThreadCountBoMapper();
    final JoinTotalThreadCountBo joinTotalThreadCountBo = mapper.map(tFAgentStat);
    assertNotNull(joinTotalThreadCountBo);
    assertEquals(joinTotalThreadCountBo.getId(), "testAgent");
    assertEquals(joinTotalThreadCountBo.getTimestamp(), 1491274138454L);
    assertEquals(joinTotalThreadCountBo.getTotalThreadCountJoinValue(), new JoinLongFieldBo(50L, 50L, "testAgent", 50L, "testAgent"));
}
Also used : JoinTotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) TFTotalThreadCount(com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount) Test(org.junit.Test)

Aggregations

TFTotalThreadCount (com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount)4 Test (org.junit.Test)3 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)2 JoinTotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo)2 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)2 TotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo)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