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