use of com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc in project pinpoint by naver.
the class TFJvmGcMapper method map.
public TFJvmGc map(JvmGcBo jvmGcBo) {
TFJvmGc tFJvmGc = new TFJvmGc();
tFJvmGc.setJvmMemoryHeapUsed(jvmGcBo.getHeapUsed());
tFJvmGc.setJvmMemoryNonHeapUsed(jvmGcBo.getNonHeapUsed());
return tFJvmGc;
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc in project pinpoint by naver.
the class TFAgentStatMapperTest method map3Test.
@Test
public void map3Test() {
AgentStatBo agentStatBo = createJvmGcBoList();
List<TFAgentStat> tFAgentStatList = newAgentStatMapper().map(agentStatBo);
assertEquals(2, tFAgentStatList.size());
TFAgentStat tFAgentStat1 = tFAgentStatList.get(0);
assertEquals(tFAgentStat1.getAgentId(), TEST_AGENT);
assertEquals(tFAgentStat1.getStartTimestamp(), startTimestamp);
assertEquals(tFAgentStat1.getTimestamp(), collectTime1st);
TFJvmGc tFJvmGc1 = tFAgentStat1.getGc();
assertEquals(tFJvmGc1.getJvmMemoryHeapUsed(), 3000);
assertEquals(tFJvmGc1.getJvmMemoryNonHeapUsed(), 300);
TFAgentStat tFAgentStat2 = tFAgentStatList.get(1);
assertEquals(tFAgentStat2.getAgentId(), TEST_AGENT);
assertEquals(tFAgentStat2.getStartTimestamp(), startTimestamp);
assertEquals(tFAgentStat2.getTimestamp(), collectTime2nd);
TFJvmGc tFJvmGc2 = tFAgentStat2.getGc();
assertEquals(tFJvmGc2.getJvmMemoryHeapUsed(), 3100);
assertEquals(tFJvmGc2.getJvmMemoryNonHeapUsed(), 310);
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc 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.TFJvmGc in project pinpoint by naver.
the class TBaseFlatMapperTest method createTFAgentStatBatch2.
private TFAgentStatBatch createTFAgentStatBatch2() {
final TFAgentStatBatch tFAgentStatBatch = new TFAgentStatBatch();
tFAgentStatBatch.setStartTimestamp(1491274142454L);
tFAgentStatBatch.setAgentId(AGENT_ID);
final TFAgentStat tFAgentStat = new TFAgentStat();
tFAgentStat.setAgentId(AGENT_ID);
tFAgentStat.setTimestamp(1491274143454L);
final TFJvmGc tFJvmGc = new TFJvmGc();
tFJvmGc.setJvmMemoryHeapUsed(3000);
tFJvmGc.setJvmMemoryNonHeapUsed(450);
tFAgentStat.setGc(tFJvmGc);
final TFAgentStat tFAgentStat2 = new TFAgentStat();
tFAgentStat2.setAgentId(AGENT_ID);
tFAgentStat2.setTimestamp(1491274148454L);
final TFJvmGc tFJvmGc2 = new TFJvmGc();
tFJvmGc2.setJvmMemoryHeapUsed(2000);
tFJvmGc2.setJvmMemoryNonHeapUsed(850);
tFAgentStat2.setGc(tFJvmGc2);
final List<TFAgentStat> tFAgentStatList = new ArrayList<>(2);
tFAgentStatList.add(tFAgentStat);
tFAgentStatList.add(tFAgentStat2);
tFAgentStatBatch.setAgentStats(tFAgentStatList);
return tFAgentStatBatch;
}
use of com.navercorp.pinpoint.thrift.dto.flink.TFJvmGc in project pinpoint by naver.
the class JoinMemoryBoMapper method map.
public JoinMemoryBo map(TFAgentStat tFAgentStat) {
if (!tFAgentStat.isSetGc()) {
return JoinMemoryBo.EMPTY_JOIN_MEMORY_BO;
}
JoinMemoryBo joinMemoryBo = new JoinMemoryBo();
joinMemoryBo.setId(tFAgentStat.getAgentId());
TFJvmGc memory = tFAgentStat.getGc();
joinMemoryBo.setTimestamp(tFAgentStat.getTimestamp());
final String agentId = tFAgentStat.getAgentId();
final long jvmMemoryHeapUsed = memory.getJvmMemoryHeapUsed();
joinMemoryBo.setHeapUsedJoinValue(new JoinLongFieldBo(jvmMemoryHeapUsed, jvmMemoryHeapUsed, agentId, jvmMemoryHeapUsed, agentId));
final long jvmMemoryNonHeapUsed = memory.getJvmMemoryNonHeapUsed();
joinMemoryBo.setNonHeapUsedJoinValue(new JoinLongFieldBo(jvmMemoryNonHeapUsed, jvmMemoryNonHeapUsed, agentId, jvmMemoryNonHeapUsed, agentId));
return joinMemoryBo;
}
Aggregations