use of com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup in project pinpoint by naver.
the class ApplicationCpuLoadChartGroupTest method createApplicationCpuLoadChartGroupTest.
@Test
public void createApplicationCpuLoadChartGroupTest() {
long time = 1495418083250L;
Range range = Range.newRange(time - 240000, time);
TimeWindow timeWindow = new TimeWindow(range);
List<AggreJoinCpuLoadBo> aggreCpuLoadList = new ArrayList<>(5);
AggreJoinCpuLoadBo aggreJoinCpuLoadBo1 = new AggreJoinCpuLoadBo("testApp", 0.11, 0.60, "agent1_1", 0.20, "agent1_2", 0.1, 0.60, "agent1_3", 0.47, "agent1_4", time);
AggreJoinCpuLoadBo aggreJoinCpuLoadBo2 = new AggreJoinCpuLoadBo("testApp", 0.22, 0.52, "agent2_1", 0.10, "agent2_2", 0.2, 0.70, "agent2_3", 0.24, "agent2_4", time - 60000);
AggreJoinCpuLoadBo aggreJoinCpuLoadBo3 = new AggreJoinCpuLoadBo("testApp", 0.33, 0.39, "agent3_1", 0.9, "agent3_2", 0.3, 0.85, "agent3_3", 0.33, "agent3_4", time - 120000);
AggreJoinCpuLoadBo aggreJoinCpuLoadBo4 = new AggreJoinCpuLoadBo("testApp", 0.44, 0.42, "agent4_1", 0.25, "agent4_2", 0.4, 0.58, "agent4_3", 0.56, "agent4_4", time - 180000);
AggreJoinCpuLoadBo aggreJoinCpuLoadBo5 = new AggreJoinCpuLoadBo("testApp", 0.55, 0.55, "agent5_1", 0.54, "agent5_2", 0.5, 0.86, "agent5_3", 0.76, "agent5_4", time - 240000);
aggreCpuLoadList.add(aggreJoinCpuLoadBo1);
aggreCpuLoadList.add(aggreJoinCpuLoadBo2);
aggreCpuLoadList.add(aggreJoinCpuLoadBo3);
aggreCpuLoadList.add(aggreJoinCpuLoadBo4);
aggreCpuLoadList.add(aggreJoinCpuLoadBo5);
StatChartGroup applicationCpuLoadChartGroup = new ApplicationCpuLoadChart.ApplicationCpuLoadChartGroup(timeWindow, aggreCpuLoadList);
Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationCpuLoadChartGroup.getCharts();
assertEquals(2, charts.size());
Chart jvmCpuLodChart = charts.get(ApplicationCpuLoadChart.ApplicationCpuLoadChartGroup.CpuLoadChartType.CPU_LOAD_JVM);
List<Point> jvmCpuLoadPoints = jvmCpuLodChart.getPoints();
assertEquals(5, jvmCpuLoadPoints.size());
int index = jvmCpuLoadPoints.size();
for (Point point : jvmCpuLoadPoints) {
testJvmCpuLoad((DoubleApplicationStatPoint) point, aggreCpuLoadList.get(--index));
}
Chart sysCpuLoadChart = charts.get(ApplicationCpuLoadChart.ApplicationCpuLoadChartGroup.CpuLoadChartType.CPU_LOAD_SYSTEM);
List<Point> sysCpuLoadPoints = sysCpuLoadChart.getPoints();
assertEquals(5, sysCpuLoadPoints.size());
index = sysCpuLoadPoints.size();
for (Point point : sysCpuLoadPoints) {
testSysCpuLoad((DoubleApplicationStatPoint) point, aggreCpuLoadList.get(--index));
}
}
use of com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup in project pinpoint by pinpoint-apm.
the class ApplicationTransactionChartGroupTest method createApplicationTransactionChartGroupTest.
@Test
public void createApplicationTransactionChartGroupTest() {
long time = 1495418083250L;
Range range = Range.newRange(time - 240000, time);
TimeWindow timeWindow = new TimeWindow(range);
final String id = "test_app";
List<AggreJoinTransactionBo> aggreJoinTransactionBoList = new ArrayList<AggreJoinTransactionBo>(5);
AggreJoinTransactionBo aggreJoinTransactionBo1 = new AggreJoinTransactionBo(id, 5000, 150, 10, "app_1_1", 230, "app_1_2", time);
AggreJoinTransactionBo aggreJoinTransactionBo2 = new AggreJoinTransactionBo(id, 5000, 110, 22, "app_2_1", 330, "app_2_2", time - 60000);
AggreJoinTransactionBo aggreJoinTransactionBo3 = new AggreJoinTransactionBo(id, 5000, 120, 24, "app_3_1", 540, "app_3_2", time - 120000);
AggreJoinTransactionBo aggreJoinTransactionBo4 = new AggreJoinTransactionBo(id, 5000, 130, 25, "app_4_1", 560, "app_4_2", time - 180000);
AggreJoinTransactionBo aggreJoinTransactionBo5 = new AggreJoinTransactionBo(id, 5000, 140, 12, "app_5_1", 260, "app_5_2", time - 240000);
aggreJoinTransactionBoList.add(aggreJoinTransactionBo1);
aggreJoinTransactionBoList.add(aggreJoinTransactionBo2);
aggreJoinTransactionBoList.add(aggreJoinTransactionBo3);
aggreJoinTransactionBoList.add(aggreJoinTransactionBo4);
aggreJoinTransactionBoList.add(aggreJoinTransactionBo5);
StatChartGroup applicationTransactionChartGroup = new ApplicationTransactionChart.ApplicationTransactionChartGroup(timeWindow, aggreJoinTransactionBoList);
Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationTransactionChartGroup.getCharts();
Chart tranCountChart = charts.get(ApplicationTransactionChart.ApplicationTransactionChartGroup.TransactionChartType.TRANSACTION_COUNT);
List<Point> tranCountPointList = tranCountChart.getPoints();
assertEquals(5, tranCountPointList.size());
int index = tranCountPointList.size();
for (Point point : tranCountPointList) {
testTranCount((DoubleApplicationStatPoint) point, aggreJoinTransactionBoList.get(--index));
}
}
use of com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup in project pinpoint by pinpoint-apm.
the class ApplicationDirectBufferChartGroupTest method createApplicationDirectBufferChartGroupTest.
@Test
public void createApplicationDirectBufferChartGroupTest() {
long time = 1495418083250L;
Range range = Range.newRange(time - 240000, time);
TimeWindow timeWindow = new TimeWindow(range);
List<AggreJoinDirectBufferBo> aggreDirectBufferList = new ArrayList<>(5);
AggreJoinDirectBufferBo aggreJoinDirectBufferBo1 = new AggreJoinDirectBufferBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", time);
AggreJoinDirectBufferBo aggreJoinDirectBufferBo2 = new AggreJoinDirectBufferBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", time - 60000);
AggreJoinDirectBufferBo aggreJoinDirectBufferBo3 = new AggreJoinDirectBufferBo("testApp", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", time - 120000);
AggreJoinDirectBufferBo aggreJoinDirectBufferBo4 = new AggreJoinDirectBufferBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", time - 180000);
AggreJoinDirectBufferBo aggreJoinDirectBufferBo5 = new AggreJoinDirectBufferBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", time - 240000);
aggreDirectBufferList.add(aggreJoinDirectBufferBo1);
aggreDirectBufferList.add(aggreJoinDirectBufferBo2);
aggreDirectBufferList.add(aggreJoinDirectBufferBo3);
aggreDirectBufferList.add(aggreJoinDirectBufferBo4);
aggreDirectBufferList.add(aggreJoinDirectBufferBo5);
StatChartGroup applicationDirectBufferChartGroup = new ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup(timeWindow, aggreDirectBufferList);
Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationDirectBufferChartGroup.getCharts();
assertEquals(4, charts.size());
Chart directCountChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.DIRECT_COUNT);
List<Point> directCountPoints = directCountChart.getPoints();
assertEquals(5, directCountPoints.size());
int index = directCountPoints.size();
for (Point point : directCountPoints) {
testDirectCount((LongApplicationStatPoint) point, aggreDirectBufferList.get(--index));
}
Chart directMemoryUsedChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.DIRECT_MEMORY_USED);
List<Point> directMemoryUsedPoints = directMemoryUsedChart.getPoints();
assertEquals(5, directMemoryUsedPoints.size());
index = directMemoryUsedPoints.size();
for (Point point : directMemoryUsedPoints) {
testDirectMemoryUsed((LongApplicationStatPoint) point, aggreDirectBufferList.get(--index));
}
Chart mappedCountChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.MAPPED_COUNT);
List<Point> mappeedCountPoints = mappedCountChart.getPoints();
assertEquals(5, mappeedCountPoints.size());
index = mappeedCountPoints.size();
for (Point point : mappeedCountPoints) {
testMappedCount((LongApplicationStatPoint) point, aggreDirectBufferList.get(--index));
}
Chart mappedMemoryUsedChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.MAPPED_MEMORY_USED);
List<Point> mappedMemoryUsedPoints = mappedMemoryUsedChart.getPoints();
assertEquals(5, mappedMemoryUsedPoints.size());
index = mappedMemoryUsedPoints.size();
for (Point point : mappedMemoryUsedPoints) {
testMappedMemoryUsed((LongApplicationStatPoint) point, aggreDirectBufferList.get(--index));
}
}
use of com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup in project pinpoint by pinpoint-apm.
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));
}
}
use of com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup in project pinpoint by pinpoint-apm.
the class DeadlockChartGroupTest method basicFunctionTest1.
@Test
public void basicFunctionTest1() throws Exception {
long currentTimeMillis = System.currentTimeMillis();
TimeWindow timeWindow = new TimeWindow(Range.newRange(currentTimeMillis - 300000, currentTimeMillis));
List<SampledDeadlock> sampledDeadlockList = createSampledResponseTimeList(timeWindow);
StatChartGroup deadlockChartGroup = new DeadlockChart.DeadlockChartGroup(timeWindow, sampledDeadlockList);
assertEquals(sampledDeadlockList, deadlockChartGroup);
}
Aggregations