Search in sources :

Example 26 with TFAgentStat

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

the class JoinLoadedClassBoMapperTest method map2Test.

@Test
public void map2Test() {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final JoinLoadedClassBoMapper mapper = new JoinLoadedClassBoMapper();
    final JoinLoadedClassBo joinLoadedClassBo = mapper.map(tFAgentStat);
    assertEquals(joinLoadedClassBo, joinLoadedClassBo.EMPTY_JOIN_LOADED_CLASS_BO);
}
Also used : TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinLoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLoadedClassBo) Test(org.junit.Test)

Example 27 with TFAgentStat

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

the class JoinLoadedClassBoMapperTest method mapTest.

@Test
public void mapTest() throws Exception {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final TFLoadedClass tfLoadedClass = new TFLoadedClass();
    tfLoadedClass.setLoadedClassCount(50);
    tfLoadedClass.setUnloadedClassCount(50);
    tFAgentStat.setLoadedClass(tfLoadedClass);
    final JoinLoadedClassBoMapper mapper = new JoinLoadedClassBoMapper();
    final JoinLoadedClassBo joinLoadedClassBo = mapper.map(tFAgentStat);
    assertNotNull(joinLoadedClassBo);
    assertEquals("testAgent", joinLoadedClassBo.getId());
    assertEquals(1491274138454L, joinLoadedClassBo.getTimestamp());
    assertEquals(new JoinLongFieldBo(50L, 50L, "testAgent", 50L, "testAgent"), joinLoadedClassBo.getLoadedClassJoinValue());
    assertEquals(new JoinLongFieldBo(50L, 50L, "testAgent", 50L, "testAgent"), joinLoadedClassBo.getUnloadedClassJoinValue());
}
Also used : TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) JoinLoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLoadedClassBo) TFLoadedClass(com.navercorp.pinpoint.thrift.dto.flink.TFLoadedClass) Test(org.junit.Test)

Example 28 with TFAgentStat

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

the class JoinThriftCpuLoadBoMapperTest method map2Test.

@Test
public void map2Test() {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final JoinCpuLoadBoMapper mapper = new JoinCpuLoadBoMapper();
    final JoinCpuLoadBo joinCpuLoadBo = mapper.map(tFAgentStat);
    assertEquals(joinCpuLoadBo, joinCpuLoadBo.EMPTY_JOIN_CPU_LOAD_BO);
}
Also used : JoinCpuLoadBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinCpuLoadBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Example 29 with TFAgentStat

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

the class JoinTransactionBoMapperTest method map2Test.

@Test
public void map2Test() {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    final String id = "testAgent";
    tFAgentStat.setAgentId(id);
    tFAgentStat.setTimestamp(1491274138454L);
    tFAgentStat.setCollectInterval(5000);
    final JoinTransactionBoMapper joinTransactionBoMapper = new JoinTransactionBoMapper();
    final JoinTransactionBo joinTransactionBo = joinTransactionBoMapper.map(tFAgentStat);
    assertEquals(joinTransactionBo, JoinTransactionBo.EMPTY_JOIN_TRANSACTION_BO);
}
Also used : TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) Test(org.junit.Test)

Example 30 with TFAgentStat

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

the class TFAgentStatMapperTest method map8Test.

@Test
public void map8Test() {
    AgentStatBo agentStatBo = createLoadedClassCountBoList();
    List<TFAgentStat> tFAgentStatList = newAgentStatMapper().map(agentStatBo);
    assertEquals(3, tFAgentStatList.size());
    TFAgentStat tFAgentStat1 = tFAgentStatList.get(0);
    assertEquals(TEST_AGENT, tFAgentStat1.getAgentId());
    assertEquals(startTimestamp, tFAgentStat1.getStartTimestamp());
    assertEquals(collectTime1st, tFAgentStat1.getTimestamp());
    assertEquals(4, tFAgentStat1.getLoadedClass().getLoadedClassCount(), 0);
    assertEquals(4, tFAgentStat1.getLoadedClass().getUnloadedClassCount(), 0);
    TFAgentStat tFAgentStat2 = tFAgentStatList.get(1);
    assertEquals(TEST_AGENT, tFAgentStat2.getAgentId());
    assertEquals(startTimestamp, tFAgentStat2.getStartTimestamp());
    assertEquals(collectTime2nd, tFAgentStat2.getTimestamp());
    assertEquals(5, tFAgentStat2.getLoadedClass().getLoadedClassCount(), 0);
    assertEquals(5, tFAgentStat2.getLoadedClass().getUnloadedClassCount(), 0);
    TFAgentStat tFAgentStat3 = tFAgentStatList.get(2);
    assertEquals(TEST_AGENT, tFAgentStat3.getAgentId());
    assertEquals(startTimestamp, tFAgentStat3.getStartTimestamp());
    assertEquals(collectTime3rd, tFAgentStat3.getTimestamp());
    assertEquals(6, tFAgentStat3.getLoadedClass().getLoadedClassCount(), 0);
    assertEquals(6, tFAgentStat3.getLoadedClass().getUnloadedClassCount(), 0);
}
Also used : AgentStatBo(com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Aggregations

TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)43 Test (org.junit.Test)36 ArrayList (java.util.ArrayList)15 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)14 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)10 AgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo)9 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)8 TFJvmGc (com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc)4 TFResponseTime (com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime)4 JoinActiveTraceBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo)3 JoinCpuLoadBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinCpuLoadBo)3 JoinIntFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinIntFieldBo)3 JoinLoadedClassBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLoadedClassBo)3 JoinMemoryBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinMemoryBo)3 JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)3 JoinTotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo)3 JoinTransactionBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo)3 TFActiveTrace (com.navercorp.pinpoint.thrift.dto.flink.TFActiveTrace)3 TFActiveTraceHistogram (com.navercorp.pinpoint.thrift.dto.flink.TFActiveTraceHistogram)3 TFCpuLoad (com.navercorp.pinpoint.thrift.dto.flink.TFCpuLoad)3