Search in sources :

Example 36 with TFAgentStat

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

Example 37 with TFAgentStat

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

the class JoinThriftCpuLoadBoMapperTest method mapTest.

@Test
public void mapTest() throws Exception {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    final TFCpuLoad tfCpuLoad = new TFCpuLoad();
    tfCpuLoad.setJvmCpuLoad(10);
    tfCpuLoad.setSystemCpuLoad(30);
    tFAgentStat.setCpuLoad(tfCpuLoad);
    final JoinCpuLoadBoMapper mapper = new JoinCpuLoadBoMapper();
    final JoinCpuLoadBo joinCpuLoadBo = mapper.map(tFAgentStat);
    assertNotNull(joinCpuLoadBo);
    assertEquals(joinCpuLoadBo.getId(), "testAgent");
    assertEquals(joinCpuLoadBo.getTimestamp(), 1491274138454L);
    final JoinDoubleFieldBo jvmCpuLoadJoinValue = joinCpuLoadBo.getJvmCpuLoadJoinValue();
    assertEquals(jvmCpuLoadJoinValue.getAvg(), 10, 0);
    assertEquals(jvmCpuLoadJoinValue.getMin(), 10, 0);
    assertEquals(jvmCpuLoadJoinValue.getMax(), 10, 0);
    final JoinDoubleFieldBo systemCpuLoadJoinValue = joinCpuLoadBo.getSystemCpuLoadJoinValue();
    assertEquals(systemCpuLoadJoinValue.getAvg(), 30, 0);
    assertEquals(systemCpuLoadJoinValue.getMin(), 30, 0);
    assertEquals(systemCpuLoadJoinValue.getMax(), 30, 0);
}
Also used : JoinCpuLoadBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinCpuLoadBo) TFCpuLoad(com.navercorp.pinpoint.thrift.dto.flink.TFCpuLoad) JoinDoubleFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDoubleFieldBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Example 38 with TFAgentStat

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

the class JoinTransactionBoMapperTest method mapTest.

@Test
public void mapTest() throws Exception {
    final TFAgentStat tFAgentStat = new TFAgentStat();
    final String id = "testAgent";
    tFAgentStat.setAgentId(id);
    tFAgentStat.setTimestamp(1491274138454L);
    tFAgentStat.setCollectInterval(5000);
    final TFTransaction tFTransaction = new TFTransaction();
    tFTransaction.setSampledNewCount(10);
    tFTransaction.setSampledContinuationCount(20);
    tFTransaction.setUnsampledNewCount(40);
    tFTransaction.setUnsampledContinuationCount(50);
    tFTransaction.setSkippedNewCount(60);
    tFTransaction.setSkippedContinuationCount(70);
    tFAgentStat.setTransaction(tFTransaction);
    final JoinTransactionBoMapper joinTransactionBoMapper = new JoinTransactionBoMapper();
    final JoinTransactionBo joinTransactionBo = joinTransactionBoMapper.map(tFAgentStat);
    assertNotNull(joinTransactionBo);
    assertEquals(joinTransactionBo.getId(), id);
    assertEquals(joinTransactionBo.getTimestamp(), 1491274138454L);
    assertEquals(joinTransactionBo.getCollectInterval(), 5000);
    assertEquals(joinTransactionBo.getTotalCountJoinValue(), new JoinLongFieldBo(250L, 250L, id, 250L, id));
}
Also used : TFTransaction(com.navercorp.pinpoint.thrift.dto.flink.TFTransaction) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Example 39 with TFAgentStat

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

the class JoinDataSourceListBoMapperTest method map2Test.

@Test
public void map2Test() {
    JoinDataSourceListBoMapper mapper = new JoinDataSourceListBoMapper();
    TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    JoinDataSourceListBo joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
    TFDataSourceList tFDataSourceList = new TFDataSourceList();
    tFAgentStat.setDataSourceList(tFDataSourceList);
    joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
    List<TFDataSource> dataSourceList = new ArrayList<>();
    tFDataSourceList.setDataSourceList(dataSourceList);
    joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
}
Also used : TFDataSourceList(com.navercorp.pinpoint.thrift.dto.flink.TFDataSourceList) ArrayList(java.util.ArrayList) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) TFDataSource(com.navercorp.pinpoint.thrift.dto.flink.TFDataSource) JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo) Test(org.junit.Test)

Example 40 with TFAgentStat

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

the class JoinFileDescriptorBoMapperTest method map2Test.

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