Search in sources :

Example 1 with AggreJoinResponseTimeBo

use of com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo in project pinpoint by naver.

the class JoinResponseTimeSamplerTest method sampleDataPoints2Test.

@Test
public void sampleDataPoints2Test() {
    long currentTime = 1487149800000L;
    JoinResponseTimeSampler joinResponseTimeSampler = new JoinResponseTimeSampler();
    List<JoinResponseTimeBo> joinResponseTimeBoList = new ArrayList<JoinResponseTimeBo>();
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo = joinResponseTimeSampler.sampleDataPoints(1, currentTime, joinResponseTimeBoList, JoinResponseTimeBo.EMPTY_JOIN_RESPONSE_TIME_BO);
    assertEquals(aggreJoinResponseTimeBo.getId(), JoinResponseTimeBo.UNKNOWN_ID);
    assertEquals(aggreJoinResponseTimeBo.getTimestamp(), 1487149800000L);
    assertEquals(aggreJoinResponseTimeBo.getResponseTimeJoinValue(), new JoinLongFieldBo(JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNKNOWN_AGENT, JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNKNOWN_AGENT));
}
Also used : JoinResponseTimeBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) ArrayList(java.util.ArrayList) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Example 2 with AggreJoinResponseTimeBo

use of com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo in project pinpoint by naver.

the class JoinResponseTimeSampler method sampleDataPoints.

@Override
public AggreJoinResponseTimeBo sampleDataPoints(int index, long timestamp, List<JoinResponseTimeBo> joinResponseTimeBoList, JoinResponseTimeBo previousDataPoint) {
    if (CollectionUtils.isEmpty(joinResponseTimeBoList)) {
        return AggreJoinResponseTimeBo.createUncollectedObject(timestamp);
    }
    JoinResponseTimeBo joinResponseTimeBo = JoinResponseTimeBo.joinResponseTimeBoList(joinResponseTimeBoList, timestamp);
    String id = joinResponseTimeBo.getId();
    JoinLongFieldBo responseTimeJoinValue = joinResponseTimeBo.getResponseTimeJoinValue();
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo = new AggreJoinResponseTimeBo(id, timestamp, responseTimeJoinValue);
    return aggreJoinResponseTimeBo;
}
Also used : JoinResponseTimeBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Example 3 with AggreJoinResponseTimeBo

use of com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo in project pinpoint by naver.

the class ApplicationResponseTimeChartGroupTest method createApplicationResponseTimeChartGroupTest.

@Test
public void createApplicationResponseTimeChartGroupTest() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    final String id = "test_app";
    List<AggreJoinResponseTimeBo> aggreJoinResponseTimeBoList = new ArrayList<AggreJoinResponseTimeBo>();
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo1 = new AggreJoinResponseTimeBo(id, time, 3000, 2, "app_1_1", 6000, "app_1_1");
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo2 = new AggreJoinResponseTimeBo(id, time - 60000, 4000, 200, "app_2_1", 9000, "app_2_1");
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo3 = new AggreJoinResponseTimeBo(id, time - 120000, 2000, 20, "app_3_1", 7000, "app_3_1");
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo4 = new AggreJoinResponseTimeBo(id, time - 180000, 5000, 20, "app_4_1", 8000, "app_4_1");
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo5 = new AggreJoinResponseTimeBo(id, time - 240000, 1000, 10, "app_5_1", 6600, "app_5_1");
    aggreJoinResponseTimeBoList.add(aggreJoinResponseTimeBo1);
    aggreJoinResponseTimeBoList.add(aggreJoinResponseTimeBo2);
    aggreJoinResponseTimeBoList.add(aggreJoinResponseTimeBo3);
    aggreJoinResponseTimeBoList.add(aggreJoinResponseTimeBo4);
    aggreJoinResponseTimeBoList.add(aggreJoinResponseTimeBo5);
    StatChartGroup applicationResponseTimeChartGroup = new ApplicationResponseTimeChart.ApplicationResponseTimeChartGroup(timeWindow, aggreJoinResponseTimeBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationResponseTimeChartGroup.getCharts();
    Chart responseTimeChart = charts.get(ApplicationResponseTimeChart.ApplicationResponseTimeChartGroup.ResponseTimeChartType.RESPONSE_TIME);
    List<Point> responseTimePointList = responseTimeChart.getPoints();
    assertEquals(5, responseTimePointList.size());
    int index = responseTimePointList.size();
    for (Point point : responseTimePointList) {
        testResponseTimeCount((DoubleApplicationStatPoint) point, aggreJoinResponseTimeBoList.get(--index));
    }
}
Also used : ArrayList(java.util.ArrayList) Point(com.navercorp.pinpoint.web.vo.chart.Point) Range(com.navercorp.pinpoint.web.vo.Range) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) Point(com.navercorp.pinpoint.web.vo.chart.Point) StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 4 with AggreJoinResponseTimeBo

use of com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo in project pinpoint by naver.

the class JoinResponseTimeSamplerTest method sampleDataPointsTest.

@Test
public void sampleDataPointsTest() {
    long currentTime = 1487149800000L;
    JoinResponseTimeSampler joinResponseTimeSampler = new JoinResponseTimeSampler();
    List<JoinResponseTimeBo> joinResponseTimeBoList = createJoinResponseTimeList(currentTime);
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo = joinResponseTimeSampler.sampleDataPoints(1, currentTime, joinResponseTimeBoList, JoinResponseTimeBo.EMPTY_JOIN_RESPONSE_TIME_BO);
    assertEquals(aggreJoinResponseTimeBo.getId(), "test_app");
    assertEquals(aggreJoinResponseTimeBo.getTimestamp(), 1487149800000L);
    assertEquals(aggreJoinResponseTimeBo.getResponseTimeJoinValue(), new JoinLongFieldBo(3000L, 2L, "app_1_1", 9000L, "app_2_1"));
}
Also used : JoinResponseTimeBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Aggregations

AggreJoinResponseTimeBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo)4 JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)3 JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 TimeWindow (com.navercorp.pinpoint.web.util.TimeWindow)1 Range (com.navercorp.pinpoint.web.vo.Range)1 Chart (com.navercorp.pinpoint.web.vo.chart.Chart)1 Point (com.navercorp.pinpoint.web.vo.chart.Point)1 StatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup)1