Search in sources :

Example 1 with Chart

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);
    }
}
Also used : SampledDataSource(com.navercorp.pinpoint.web.vo.stat.SampledDataSource) Point(com.navercorp.pinpoint.web.vo.chart.Point) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Point(com.navercorp.pinpoint.web.vo.chart.Point)

Aggregations

Chart (com.navercorp.pinpoint.web.vo.chart.Chart)1 Point (com.navercorp.pinpoint.web.vo.chart.Point)1 SampledDataSource (com.navercorp.pinpoint.web.vo.stat.SampledDataSource)1