Search in sources :

Example 1 with StatChartGroup

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

the class ApplicationDataSourceChartGroupTest method createApplicationDataSourceChartGroup.

@Test
public void createApplicationDataSourceChartGroup() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinDataSourceBo> aggreJoinDataSourceBoList = new ArrayList<>();
    AggreJoinDataSourceBo aggreJoinDataSourceBo1 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 30, 25, "agent_id_1", 60, "agent_id_6", time);
    AggreJoinDataSourceBo aggreJoinDataSourceBo2 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 20, 5, "agent_id_2", 30, "agent_id_7", time - 60000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo3 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 10, 25, "agent_id_3", 50, "agent_id_8", time - 120000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo4 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 40, 4, "agent_id_4", 70, "agent_id_9", time - 180000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo5 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 50, 25, "agent_id_5", 80, "agent_id_10", time - 240000);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo1);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo2);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo3);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo4);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo5);
    StatChartGroup applicationDataSourceChartGroup = new ApplicationDataSourceChart.ApplicationDataSourceChartGroup(timeWindow, "jdbc:mysql", "dbcp2", aggreJoinDataSourceBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationDataSourceChartGroup.getCharts();
    assertEquals(1, charts.size());
    Chart dataSourceChart = charts.get(ApplicationDataSourceChart.ApplicationDataSourceChartGroup.DataSourceChartType.ACTIVE_CONNECTION_SIZE);
    List<Point> dataSourcePoints = dataSourceChart.getPoints();
    assertEquals(5, dataSourcePoints.size());
    int index = dataSourcePoints.size();
    for (Point point : dataSourcePoints) {
        testDataSource((IntApplicationStatPoint) point, aggreJoinDataSourceBoList.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) AggreJoinDataSourceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceBo) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 2 with StatChartGroup

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

the class ApplicationFileDescriptorChartGroupTest method createApplicationFileDescriptorChartGroupTest.

@Test
public void createApplicationFileDescriptorChartGroupTest() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinFileDescriptorBo> aggreFileDescriptorList = new ArrayList<>(5);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo1 = new AggreJoinFileDescriptorBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", time);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo2 = new AggreJoinFileDescriptorBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", time - 60000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo3 = new AggreJoinFileDescriptorBo("testApp", 33, 39, "agent3_1", 9, "agent3_2", time - 120000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo4 = new AggreJoinFileDescriptorBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", time - 180000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo5 = new AggreJoinFileDescriptorBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", time - 240000);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo1);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo2);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo3);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo4);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo5);
    StatChartGroup applicationFileDescriptorChartGroup = new ApplicationFileDescriptorChart.ApplicationFileDescriptorChartGroup(timeWindow, aggreFileDescriptorList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationFileDescriptorChartGroup.getCharts();
    assertEquals(1, charts.size());
    Chart fileDescriptorChart = charts.get(ApplicationFileDescriptorChart.ApplicationFileDescriptorChartGroup.FileDescriptorChartType.OPEN_FILE_DESCRIPTOR_COUNT);
    List<Point> fileDescriptorPoints = fileDescriptorChart.getPoints();
    assertEquals(5, fileDescriptorPoints.size());
    int index = fileDescriptorPoints.size();
    for (Point point : fileDescriptorPoints) {
        testOpenFileDescriptor((LongApplicationStatPoint) point, aggreFileDescriptorList.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) AggreJoinFileDescriptorBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinFileDescriptorBo) StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 3 with StatChartGroup

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

the class ApplicationTotalThreadCountChartGroupTest method createApplicationTotalThreadCountChartGroupTest.

@Test
public void createApplicationTotalThreadCountChartGroupTest() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinTotalThreadCountBo> aggreJoinTotalThreadCountBoList = new ArrayList<>(5);
    AggreJoinTotalThreadCountBo aggreJoinFileDescriptorBo1 = new AggreJoinTotalThreadCountBo("testApp", time, 11, 20, "agent1_1", 60, "agent1_2");
    AggreJoinTotalThreadCountBo aggreJoinFileDescriptorBo2 = new AggreJoinTotalThreadCountBo("testApp", time - 60000, 22, 10, "agent2_1", 52, "agent2_2");
    AggreJoinTotalThreadCountBo aggreJoinFileDescriptorBo3 = new AggreJoinTotalThreadCountBo("testApp", time - 120000, 33, 9, "agent3_1", 39, "agent3_2");
    AggreJoinTotalThreadCountBo aggreJoinFileDescriptorBo4 = new AggreJoinTotalThreadCountBo("testApp", time - 180000, 44, 25, "agent4_1", 42, "agent4_2");
    AggreJoinTotalThreadCountBo aggreJoinFileDescriptorBo5 = new AggreJoinTotalThreadCountBo("testApp", time - 240000, 55, 54, "agent5_1", 55, "agent5_2");
    aggreJoinTotalThreadCountBoList.add(aggreJoinFileDescriptorBo1);
    aggreJoinTotalThreadCountBoList.add(aggreJoinFileDescriptorBo2);
    aggreJoinTotalThreadCountBoList.add(aggreJoinFileDescriptorBo3);
    aggreJoinTotalThreadCountBoList.add(aggreJoinFileDescriptorBo4);
    aggreJoinTotalThreadCountBoList.add(aggreJoinFileDescriptorBo5);
    StatChartGroup applicationTotalThreadCountChartGroup = new ApplicationTotalThreadCountChart.ApplicationTotalThreadCountChartGroup(timeWindow, aggreJoinTotalThreadCountBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationTotalThreadCountChartGroup.getCharts();
    assertEquals(1, charts.size());
    Chart totalThreadCountChart = charts.get(ApplicationTotalThreadCountChart.ApplicationTotalThreadCountChartGroup.TotalThreadCountChartType.TOTAL_THREAD_COUNT);
    List<Point> totalThreadCountChartPoints = totalThreadCountChart.getPoints();
    assertEquals(5, totalThreadCountChartPoints.size());
    int index = totalThreadCountChartPoints.size();
    for (Point point : totalThreadCountChartPoints) {
        testTotalThreadCount((LongApplicationStatPoint) point, aggreJoinTotalThreadCountBoList.get(--index));
    }
}
Also used : AggreJoinTotalThreadCountBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinTotalThreadCountBo) 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) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 4 with StatChartGroup

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

the class ApplicationLoadedClassChartGroupTest method createApplicationLoadedClassChartGroupTest.

@Test
public void createApplicationLoadedClassChartGroupTest() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinLoadedClassBo> aggreJoinLoadedClassBoList = new ArrayList<>(5);
    AggreJoinLoadedClassBo aggreJoinLoadedClassBo1 = new AggreJoinLoadedClassBo("testApp", 11, 20, "agent1_1", 60, "agent1_2", 11, 20, "agent1_1", 60, "agent1_2", time);
    AggreJoinLoadedClassBo aggreJoinLoadedClassBo2 = new AggreJoinLoadedClassBo("testApp", 22, 10, "agent2_1", 52, "agent2_2", 22, 10, "agent2_1", 52, "agent2_2", time - 60000);
    AggreJoinLoadedClassBo aggreJoinLoadedClassBo3 = new AggreJoinLoadedClassBo("testApp", 33, 9, "agent3_1", 39, "agent3_2", 33, 9, "agent3_1", 39, "agent3_2", time - 120000);
    AggreJoinLoadedClassBo aggreJoinLoadedClassBo4 = new AggreJoinLoadedClassBo("testApp", 44, 25, "agent4_1", 42, "agent4_2", 44, 25, "agent4_1", 42, "agent4_2", time - 180000);
    AggreJoinLoadedClassBo aggreJoinLoadedClassBo5 = new AggreJoinLoadedClassBo("testApp", 55, 54, "agent5_1", 55, "agent5_2", 55, 54, "agent5_1", 55, "agent5_2", time - 240000);
    aggreJoinLoadedClassBoList.add(aggreJoinLoadedClassBo1);
    aggreJoinLoadedClassBoList.add(aggreJoinLoadedClassBo2);
    aggreJoinLoadedClassBoList.add(aggreJoinLoadedClassBo3);
    aggreJoinLoadedClassBoList.add(aggreJoinLoadedClassBo4);
    aggreJoinLoadedClassBoList.add(aggreJoinLoadedClassBo5);
    StatChartGroup applicationLoadedCLassChartGroup = new ApplicationLoadedClassChart.ApplicationLoadedClassChartGroup(timeWindow, aggreJoinLoadedClassBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationLoadedCLassChartGroup.getCharts();
    assertEquals(2, charts.size());
    Chart loadedClassChart = charts.get(ApplicationLoadedClassChart.ApplicationLoadedClassChartGroup.LoadedClassChartType.LOADED_CLASS_COUNT);
    List<Point> loadedClassChartPoints = loadedClassChart.getPoints();
    assertEquals(5, loadedClassChartPoints.size());
    int index = loadedClassChartPoints.size();
    for (Point point : loadedClassChartPoints) {
        testLoadedCLass((LongApplicationStatPoint) point, aggreJoinLoadedClassBoList.get(--index));
    }
    Chart unloadedClassChart = charts.get(ApplicationLoadedClassChart.ApplicationLoadedClassChartGroup.LoadedClassChartType.UNLOADED_CLASS_COUNT);
    List<Point> unloadedClassChartPoints = unloadedClassChart.getPoints();
    assertEquals(5, unloadedClassChartPoints.size());
    index = unloadedClassChartPoints.size();
    for (Point point : unloadedClassChartPoints) {
        testUnloadedCLass((LongApplicationStatPoint) point, aggreJoinLoadedClassBoList.get(--index));
    }
}
Also used : AggreJoinLoadedClassBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinLoadedClassBo) 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) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 5 with StatChartGroup

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

the class ApplicationActiveTraceChartGroupTest method createApplicationActiveTraceChartGroupTest.

@Test
public void createApplicationActiveTraceChartGroupTest() {
    long time = 1495418083250L;
    String id = "testApp";
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinActiveTraceBo> aggreJoinActiveTraceBoList = new ArrayList<>(5);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo1 = new AggreJoinActiveTraceBo(id, 1, (short) 2, 150, 10, "app_1_1", 230, "app_1_2", time);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo2 = new AggreJoinActiveTraceBo(id, 1, (short) 2, 110, 22, "app_2_1", 330, "app_2_2", time - 60000);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo3 = new AggreJoinActiveTraceBo(id, 1, (short) 2, 120, 24, "app_3_1", 540, "app_3_2", time - 120000);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo4 = new AggreJoinActiveTraceBo(id, 1, (short) 2, 130, 25, "app_4_1", 560, "app_4_2", time - 180000);
    AggreJoinActiveTraceBo aggreJoinActiveTraceBo5 = new AggreJoinActiveTraceBo(id, 1, (short) 2, 140, 12, "app_5_1", 260, "app_5_2", time - 240000);
    aggreJoinActiveTraceBoList.add(aggreJoinActiveTraceBo1);
    aggreJoinActiveTraceBoList.add(aggreJoinActiveTraceBo2);
    aggreJoinActiveTraceBoList.add(aggreJoinActiveTraceBo3);
    aggreJoinActiveTraceBoList.add(aggreJoinActiveTraceBo4);
    aggreJoinActiveTraceBoList.add(aggreJoinActiveTraceBo5);
    StatChartGroup applicationActiveTraceChartGroup = new ApplicationActiveTraceChart.ApplicationActiveTraceChartGroup(timeWindow, aggreJoinActiveTraceBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationActiveTraceChartGroup.getCharts();
    Chart<? extends Point> activeTraceChart = charts.get(ApplicationActiveTraceChart.ApplicationActiveTraceChartGroup.ActiveTraceChartType.ACTIVE_TRACE_COUNT);
    List<? extends Point> activeTracePointList = activeTraceChart.getPoints();
    assertEquals(5, activeTracePointList.size());
    int index = activeTracePointList.size();
    for (Point point : activeTracePointList) {
        testActiveTraceCount((IntApplicationStatPoint) point, aggreJoinActiveTraceBoList.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) AggreJoinActiveTraceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo) StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Aggregations

TimeWindow (com.navercorp.pinpoint.web.util.TimeWindow)13 StatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup)13 Test (org.junit.Test)13 Range (com.navercorp.pinpoint.web.vo.Range)10 Chart (com.navercorp.pinpoint.web.vo.chart.Chart)10 Point (com.navercorp.pinpoint.web.vo.chart.Point)10 ArrayList (java.util.ArrayList)10 AggreJoinActiveTraceBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo)1 AggreJoinCpuLoadBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinCpuLoadBo)1 AggreJoinDataSourceBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceBo)1 AggreJoinDirectBufferBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinDirectBufferBo)1 AggreJoinFileDescriptorBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinFileDescriptorBo)1 AggreJoinLoadedClassBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinLoadedClassBo)1 AggreJoinMemoryBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinMemoryBo)1 AggreJoinResponseTimeBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo)1 AggreJoinTotalThreadCountBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinTotalThreadCountBo)1 AggreJoinTransactionBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinTransactionBo)1 SampledDataSource (com.navercorp.pinpoint.web.vo.stat.SampledDataSource)1 SampledDeadlock (com.navercorp.pinpoint.web.vo.stat.SampledDeadlock)1 SampledResponseTime (com.navercorp.pinpoint.web.vo.stat.SampledResponseTime)1