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