for(Map.Entry<String, List<SlaveMonitorInfo>> entry : snapshot.entrySet()) {
List<LineEntry> line = new ArrayList<LineEntry>();
int time = 0;
for(SlaveMonitorInfo info : entry.getValue()) {
if(type == 0) {
line.add(new LineEntry(time++, info.getSystemLoadAverage()));
} else if(type == 1) {
line.add(new LineEntry(time++, info.getJvmTotalMemory()));
} else if(type == 2) {
line.add(new LineEntry(time++, info.getJvmFreeMemory()));
} else if(type == 3) {
line.add(new LineEntry(time++, info.getJvmMaxMemory()));
} else if(type == 4) {
line.add(new LineEntry(time++, info.getJvmThreadCount()));
} else if(type == 5) {
line.add(new LineEntry(time++, info.getJvmPeakThreadCount()));
} else if(type == 6) {
line.add(new LineEntry(time++, info.getAveragePulledTaskCount()));
} else if(type == 7) {
line.add(new LineEntry(time++, info.getAveragePullTaskConsumeTime()));
} else if(type == 8) {
line.add(new LineEntry(time++, info.getAverageTaskConsumeTime()));
} else if(type == 9) {
line.add(new LineEntry(time++, info.getKeyCount()));
} else if(type == 10) {
line.add(new LineEntry(time++, info.getValueCount()));
} else if(type == 11) {
line.add(new LineEntry(time++, info.getSlaveConsumeDataSize()));
} else if(type == 12) {
line.add(new LineEntry(time++, info.getSlaveConsumeDataLine()));
} else if(type == 13) {
line.add(new LineEntry(time++, info.getSlaveConsumeEmptyLine()));
} else if(type == 14) {
line.add(new LineEntry(time++, info.getSlaveConsumeExceptionLine()));
} else if(type == 15) {
line.add(new LineEntry(time++, info.getSlaveExecutedTaskCount()));
} else if(type == 16) {
line.add(new LineEntry(time++, info.getSlaveExecuteTaskTime()));
} else if(type == 17) {
line.add(new LineEntry(time++, info.getSlavePulledTaskCount()));
} else if(type == 18) {
line.add(new LineEntry(time++, info.getSlavePullTaskConsumeTime()));
} else if(type == 19) {
line.add(new LineEntry(time++, info.getSlaveTryPullTaskCount()));
}
}
data.put(entry.getKey(), line);
}
return data;