Search in sources :

Example 11 with TFAgentStat

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

the class JoinFileDescriptorBoMapperTest method mapTest.

@Test
public void mapTest() throws Exception {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final TFFileDescriptor tfFileDescriptor = new TFFileDescriptor();
    tfFileDescriptor.setOpenFileDescriptorCount(10);
    tFAgentStat.setFileDescriptor(tfFileDescriptor);
    final JoinFileDescriptorBoMapper mapper = new JoinFileDescriptorBoMapper();
    final JoinFileDescriptorBo joinFileDescriptorBo = mapper.map(tFAgentStat);
    assertNotNull(joinFileDescriptorBo);
    assertEquals(joinFileDescriptorBo.getId(), "testAgent");
    assertEquals(joinFileDescriptorBo.getTimestamp(), 1491274138454L);
    assertEquals(joinFileDescriptorBo.getOpenFdCountJoinValue().getAvg(), 10, 0);
    assertEquals(joinFileDescriptorBo.getOpenFdCountJoinValue().getMin(), 10, 0);
    assertEquals(joinFileDescriptorBo.getOpenFdCountJoinValue().getMax(), 10, 0);
}
Also used : TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinFileDescriptorBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinFileDescriptorBo) TFFileDescriptor(com.navercorp.pinpoint.thrift.dto.flink.TFFileDescriptor) Test(org.junit.Test)

Example 12 with TFAgentStat

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

the class JoinMemoryBoMapperTest method map1Test.

@Test
public void map1Test() throws Exception {
    final JoinMemoryBoMapper joinMemoryBoMapper = new JoinMemoryBoMapper();
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId(TEST_AGENT);
    tFAgentStat.setTimestamp(1491274138454L);
    final TFJvmGc tFJvmGc = new TFJvmGc();
    tFJvmGc.setJvmMemoryHeapUsed(1000);
    tFJvmGc.setJvmMemoryNonHeapUsed(300);
    tFAgentStat.setGc(tFJvmGc);
    JoinMemoryBo joinMemoryBo = joinMemoryBoMapper.map(tFAgentStat);
    assertEquals(joinMemoryBo.getTimestamp(), 1491274138454L);
    assertEquals(joinMemoryBo.getId(), TEST_AGENT);
    assertEquals(joinMemoryBo.getHeapUsedJoinValue(), new JoinLongFieldBo(1000L, 1000L, TEST_AGENT, 1000L, TEST_AGENT));
    assertEquals(joinMemoryBo.getNonHeapUsedJoinValue(), new JoinLongFieldBo(300L, 300L, TEST_AGENT, 300L, TEST_AGENT));
}
Also used : TFJvmGc(com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc) JoinMemoryBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinMemoryBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Example 13 with TFAgentStat

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

the class JoinMemoryBoMapperTest method map2Test.

@Test
public void map2Test() {
    final JoinMemoryBoMapper joinMemoryBoMapper = new JoinMemoryBoMapper();
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId(TEST_AGENT);
    tFAgentStat.setTimestamp(1491274138454L);
    JoinMemoryBo joinMemoryBo = joinMemoryBoMapper.map(tFAgentStat);
    assertEquals(joinMemoryBo, joinMemoryBo.EMPTY_JOIN_MEMORY_BO);
}
Also used : JoinMemoryBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinMemoryBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Example 14 with TFAgentStat

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

the class JoinThriftActiveTraceBoMapperTest method map2Test.

@Test
public void map2Test() {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    final String id = "testAgent";
    tFAgentStat.setAgentId(id);
    tFAgentStat.setTimestamp(1491274148454L);
    final JoinActiveTraceBoMapper joinActiveTraceBoMapper = new JoinActiveTraceBoMapper();
    final JoinActiveTraceBo joinActiveTraceBo = joinActiveTraceBoMapper.map(tFAgentStat);
    assertEquals(joinActiveTraceBo, JoinActiveTraceBo.EMPTY_JOIN_ACTIVE_TRACE_BO);
}
Also used : JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Example 15 with TFAgentStat

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

the class JoinTotalThreadCountBoMapperTest method map2Test.

@Test
public void map2Test() {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final JoinTotalThreadCountBoMapper mapper = new JoinTotalThreadCountBoMapper();
    final JoinTotalThreadCountBo joinTotalThreadCountBo = mapper.map(tFAgentStat);
    assertEquals(joinTotalThreadCountBo, joinTotalThreadCountBo.EMPTY_TOTAL_THREAD_COUNT_BO);
}
Also used : JoinTotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo) 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