Search in sources :

Example 1 with JoinActiveTraceBo

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

the class JoinActiveTraceSampler method sampleDataPoints.

@Override
public AggreJoinActiveTraceBo sampleDataPoints(int index, long timestamp, List<JoinActiveTraceBo> joinActiveTraceBoList, JoinActiveTraceBo previousDataPoint) {
    if (CollectionUtils.isEmpty(joinActiveTraceBoList)) {
        return AggreJoinActiveTraceBo.createUncollectedObject(timestamp);
    }
    JoinActiveTraceBo joinActiveTraceBo = JoinActiveTraceBo.joinActiveTraceBoList(joinActiveTraceBoList, timestamp);
    String id = joinActiveTraceBo.getId();
    int histogramSchemaType = joinActiveTraceBo.getHistogramSchemaType();
    short version = joinActiveTraceBo.getVersion();
    JoinIntFieldBo totalCountValue = joinActiveTraceBo.getTotalCountJoinValue();
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo = new AggreJoinActiveTraceBo(id, histogramSchemaType, version, totalCountValue, timestamp);
    return aggreJoinActiveTraceBo;
}
Also used : JoinIntFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinIntFieldBo) JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo)

Example 2 with JoinActiveTraceBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo 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);
}
Also used : JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) Test(org.junit.Test)

Example 3 with JoinActiveTraceBo

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

the class ActiveTraceCodecTest method createJoinActiveTRaceBoList.

private List<JoinStatBo> createJoinActiveTRaceBoList(long currentTime) {
    final String id = "test_app";
    List<JoinStatBo> joinActiveTraceBoList = new ArrayList<JoinStatBo>();
    JoinActiveTraceBo joinActiveTraceBo1 = new JoinActiveTraceBo(id, 1, (short) 2, 31, 11, "app_1_1", 41, "app_1_2", currentTime);
    JoinActiveTraceBo joinActiveTraceBo2 = new JoinActiveTraceBo(id, 1, (short) 2, 32, 12, "app_2_1", 42, "app_2_2", currentTime + 5000);
    JoinActiveTraceBo joinActiveTraceBo3 = new JoinActiveTraceBo(id, 1, (short) 2, 33, 13, "app_3_1", 43, "app_3_2", currentTime + 10000);
    JoinActiveTraceBo joinActiveTraceBo4 = new JoinActiveTraceBo(id, 1, (short) 2, 34, 14, "app_4_1", 44, "app_4_2", currentTime + 15000);
    JoinActiveTraceBo joinActiveTraceBo5 = new JoinActiveTraceBo(id, 1, (short) 2, 35, 15, "app_5_1", 45, "app_5_2", currentTime + 20000);
    joinActiveTraceBoList.add(joinActiveTraceBo1);
    joinActiveTraceBoList.add(joinActiveTraceBo2);
    joinActiveTraceBoList.add(joinActiveTraceBo3);
    joinActiveTraceBoList.add(joinActiveTraceBo4);
    joinActiveTraceBoList.add(joinActiveTraceBo5);
    return joinActiveTraceBoList;
}
Also used : JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) ArrayList(java.util.ArrayList) JoinStatBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)

Example 4 with JoinActiveTraceBo

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

the class JoinActiveTraceSamplerTest method createJoinActiveTraceBoList.

private List<JoinActiveTraceBo> createJoinActiveTraceBoList(long currentTime) {
    final String id = "test_app";
    List<JoinActiveTraceBo> joinActiveTraceBoList = new ArrayList<JoinActiveTraceBo>();
    JoinActiveTraceBo joinActiveTraceBo1 = new JoinActiveTraceBo(id, 1, (short) 2, 150, 10, "app_1_1", 230, "app_1_2", currentTime);
    JoinActiveTraceBo joinActiveTraceBo2 = new JoinActiveTraceBo(id, 1, (short) 2, 110, 22, "app_2_1", 330, "app_2_2", currentTime + 5000);
    JoinActiveTraceBo joinActiveTraceBo3 = new JoinActiveTraceBo(id, 1, (short) 2, 120, 24, "app_3_1", 540, "app_3_2", currentTime + 10000);
    JoinActiveTraceBo joinActiveTraceBo4 = new JoinActiveTraceBo(id, 1, (short) 2, 130, 25, "app_4_1", 560, "app_4_2", currentTime + 15000);
    JoinActiveTraceBo joinActiveTraceBo5 = new JoinActiveTraceBo(id, 1, (short) 2, 140, 12, "app_5_1", 260, "app_5_2", currentTime + 20000);
    joinActiveTraceBoList.add(joinActiveTraceBo1);
    joinActiveTraceBoList.add(joinActiveTraceBo2);
    joinActiveTraceBoList.add(joinActiveTraceBo3);
    joinActiveTraceBoList.add(joinActiveTraceBo4);
    joinActiveTraceBoList.add(joinActiveTraceBo5);
    return joinActiveTraceBoList;
}
Also used : JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo) ArrayList(java.util.ArrayList)

Example 5 with JoinActiveTraceBo

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

the class JoinActiveTraceSamplerTest method sampleDataPointsTest.

@Test
public void sampleDataPointsTest() {
    long currentTime = 1487149800000L;
    JoinActiveTraceSampler sampler = new JoinActiveTraceSampler();
    List<JoinActiveTraceBo> joinActiveTraceBoList = createJoinActiveTraceBoList(currentTime);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo = sampler.sampleDataPoints(1, currentTime, joinActiveTraceBoList, JoinActiveTraceBo.EMPTY_JOIN_ACTIVE_TRACE_BO);
    assertEquals(aggreJoinActiveTraceBo.getId(), "test_app");
    assertEquals(aggreJoinActiveTraceBo.getHistogramSchemaType(), 1);
    assertEquals(aggreJoinActiveTraceBo.getVersion(), 2);
    assertEquals(aggreJoinActiveTraceBo.getTotalCountJoinValue(), new JoinIntFieldBo(130, 10, "app_1_1", 560, "app_4_2"));
    assertEquals(aggreJoinActiveTraceBo.getTimestamp(), 1487149800000L);
}
Also used : JoinIntFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinIntFieldBo) JoinActiveTraceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo) Test(org.junit.Test)

Aggregations

JoinActiveTraceBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinActiveTraceBo)11 JoinIntFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinIntFieldBo)6 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)4 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)3 TFActiveTrace (com.navercorp.pinpoint.thrift.dto.flink.TFActiveTrace)3 TFActiveTraceHistogram (com.navercorp.pinpoint.thrift.dto.flink.TFActiveTraceHistogram)3 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)3 AggreJoinActiveTraceBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo)3 AgentStatHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderDecoder)1 BitCountingHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderDecoder)1 JoinIntFieldEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinIntFieldEncodingStrategy)1 JoinIntFieldStrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinIntFieldStrategyAnalyzer)1 StrategyAnalyzer (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.StrategyAnalyzer)1 UnsignedIntegerEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.UnsignedIntegerEncodingStrategy)1 UnsignedShortEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.UnsignedShortEncodingStrategy)1 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)1 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)1