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);
}
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));
}
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);
}
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);
}
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);
}
Aggregations