fix interval is not used in getMonitorGraph and getReportPluginGraph method in class PerfTestService
@@ -1248,8 +1248,9 @@ public class PerfTestService extends AbstractPerfTestService implements Controll
while (StringUtils.isNotBlank(line)) {
if (skipCount < dataInterval) {
skipCount++;
+ line = br.readLine();
} else {
- skipCount = 1;
+ skipCount = 0;
String[] datalist = StringUtils.split(line, ",");
if ("null".equals(datalist[4]) || "undefined".equals(datalist[4])) {
sbUsedMem.append("null").append(",");
@@ -1264,7 +1265,6 @@ public class PerfTestService extends AbstractPerfTestService implements Controll
addCustomData(customData3, 10, datalist);
addCustomData(customData4, 11, datalist);
addCustomData(customData5, 12, datalist);
- line = br.readLine();
}
}
completeCustomData(returnMap, "cpu", sbCPUUsed);
@@ -1424,8 +1424,9 @@ public class PerfTestService extends AbstractPerfTestService implements Controll
while (StringUtils.isNotBlank(line)) {
if (skipCount < interval) {
skipCount++;
+ line = br.readLine();
} else {
- skipCount = 1;
+ skipCount = 0;
String[] records = StringUtils.split(line, ",");
for (int i = 0; i < records.length; i++) {
if ("null".equals(records[i]) || "undefined".equals(records[i])) {
@@ -1434,7 +1435,6 @@ public class PerfTestService extends AbstractPerfTestService implements Controll
dataStringBuilders.get(i).append(records[i]).append(",");
}
}
- line = br.readLine();
}
}
for (int i = 0; i < refinedHeaders.length; i++) {
