use of com.navercorp.pinpoint.web.vo.chart.Chart in project pinpoint by naver.
the class DataSourceChartGroupTest method assertEquals.
private void assertEquals(List<SampledDataSource> sampledDataSourceList, DataSourceChartGroup dataSourceChartGroup) {
Map<AgentStatChartGroup.ChartType, Chart> charts = dataSourceChartGroup.getCharts();
Chart activeConnectionSizeChart = charts.get(DataSourceChartGroup.DataSourceChartType.ACTIVE_CONNECTION_SIZE);
List<Point> activeConnectionSizeChartPointList = activeConnectionSizeChart.getPoints();
for (int i = 0; i < sampledDataSourceList.size(); i++) {
SampledDataSource sampledDataSource = sampledDataSourceList.get(i);
Point<Long, Integer> point = sampledDataSource.getActiveConnectionSize();
Assert.assertEquals(activeConnectionSizeChartPointList.get(i), point);
}
Chart maxConnectionSizeChart = charts.get(DataSourceChartGroup.DataSourceChartType.MAX_CONNECTION_SIZE);
List<Point> maxConnectionSizeChartPointList = maxConnectionSizeChart.getPoints();
for (int i = 0; i < sampledDataSourceList.size(); i++) {
SampledDataSource sampledDataSource = sampledDataSourceList.get(i);
Point<Long, Integer> point = sampledDataSource.getMaxConnectionSize();
Assert.assertEquals(maxConnectionSizeChartPointList.get(i), point);
}
}
Aggregations