Search in sources :

Example 51 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class TBaseFlatMapperTest method assertJoinTransactionBo.

private void assertJoinTransactionBo(List<JoinTransactionBo> joinTransactionBoList) {
    assertEquals(2, joinTransactionBoList.size());
    JoinTransactionBo joinTransactionBo = joinTransactionBoList.get(0);
    assertEquals(joinTransactionBo.getId(), AGENT_ID);
    assertEquals(joinTransactionBo.getTimestamp(), 1491274143454L);
    assertEquals(joinTransactionBo.getCollectInterval(), 5000);
    assertEquals(joinTransactionBo.getTotalCountJoinValue(), new JoinLongFieldBo(120L, 120L, AGENT_ID, 120L, AGENT_ID));
    JoinTransactionBo joinTransactionBo2 = joinTransactionBoList.get(1);
    assertEquals(joinTransactionBo2.getId(), AGENT_ID);
    assertEquals(joinTransactionBo2.getTimestamp(), 1491274148454L);
    assertEquals(joinTransactionBo2.getCollectInterval(), 5000);
    assertEquals(joinTransactionBo2.getTotalCountJoinValue(), new JoinLongFieldBo(124L, 124L, AGENT_ID, 124L, AGENT_ID));
}
Also used : JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Example 52 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class JoinFileDescriptorBoMapper method map.

@Override
public JoinFileDescriptorBo map(TFAgentStat tFAgentStat) {
    if (!tFAgentStat.isSetFileDescriptor()) {
        return JoinFileDescriptorBo.EMPTY_JOIN_FILE_DESCRIPTOR_BO;
    }
    JoinFileDescriptorBo joinFileDescriptorBo = new JoinFileDescriptorBo();
    final String agentId = tFAgentStat.getAgentId();
    joinFileDescriptorBo.setId(agentId);
    joinFileDescriptorBo.setTimestamp(tFAgentStat.getTimestamp());
    TFFileDescriptor tFFileDescriptor = tFAgentStat.getFileDescriptor();
    final long openFileDescriptorCount = tFFileDescriptor.getOpenFileDescriptorCount();
    joinFileDescriptorBo.setOpenFdCountJoinValue(new JoinLongFieldBo(openFileDescriptorCount, openFileDescriptorCount, agentId, openFileDescriptorCount, agentId));
    return joinFileDescriptorBo;
}
Also used : JoinFileDescriptorBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinFileDescriptorBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) TFFileDescriptor(com.navercorp.pinpoint.thrift.dto.flink.TFFileDescriptor)

Example 53 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class JoinTotalThreadCountBoMapper method map.

@Override
public JoinTotalThreadCountBo map(TFAgentStat tFAgentStat) {
    if (!tFAgentStat.isSetTotalThreadCount()) {
        return JoinTotalThreadCountBo.EMPTY_TOTAL_THREAD_COUNT_BO;
    }
    JoinTotalThreadCountBo joinTotalThreadCountBo = new JoinTotalThreadCountBo();
    final String agentId = tFAgentStat.getAgentId();
    final long totalThreadCount = tFAgentStat.getTotalThreadCount().getTotalThreadCount();
    joinTotalThreadCountBo.setId(agentId);
    joinTotalThreadCountBo.setTimestamp(tFAgentStat.getTimestamp());
    joinTotalThreadCountBo.setTotalThreadCountJoinValue(new JoinLongFieldBo(totalThreadCount, totalThreadCount, agentId, totalThreadCount, agentId));
    return joinTotalThreadCountBo;
}
Also used : JoinTotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Example 54 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class JoinFileDescriptorSamplerTest method sampleDataPoints.

@Test
public void sampleDataPoints() throws Exception {
    JoinFileDescriptorSampler joinFileDescriptorSampler = new JoinFileDescriptorSampler();
    List<JoinFileDescriptorBo> joinFileDescriptorBoList = new ArrayList<>(5);
    long timeStamp = new Date().getTime();
    joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", timeStamp + 5000));
    joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", timeStamp + 10000));
    joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 33, 39, "agent3_1", 90, "agent3_2", timeStamp + 15000));
    joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", timeStamp + 20000));
    joinFileDescriptorBoList.add(new JoinFileDescriptorBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", timeStamp + 25000));
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo = joinFileDescriptorSampler.sampleDataPoints(0, new Date().getTime(), joinFileDescriptorBoList, new JoinFileDescriptorBo());
    assertEquals(aggreJoinFileDescriptorBo.getId(), "testApp");
    assertEquals(aggreJoinFileDescriptorBo.getOpenFdCountJoinValue(), new JoinLongFieldBo(33L, 10L, "agent2_2", 60L, "agent1_1"));
}
Also used : AggreJoinFileDescriptorBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinFileDescriptorBo) ArrayList(java.util.ArrayList) AggreJoinFileDescriptorBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinFileDescriptorBo) JoinFileDescriptorBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinFileDescriptorBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Date(java.util.Date) Test(org.junit.Test)

Aggregations

JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)54 ArrayList (java.util.ArrayList)18 Test (org.junit.Test)18 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)10 AgentStatHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderDecoder)8 BitCountingHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderDecoder)8 JoinLongFieldEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinLongFieldEncodingStrategy)8 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)8 JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)7 JoinTransactionBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo)7 JoinDirectBufferBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinDirectBufferBo)6 JoinLoadedClassBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLoadedClassBo)6 JoinTotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo)6 JoinMemoryBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinMemoryBo)5 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)4 JoinFileDescriptorBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinFileDescriptorBo)4 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)4 Date (java.util.Date)4 TFResponseTime (com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime)3 TFTransaction (com.navercorp.pinpoint.thrift.dto.flink.TFTransaction)3