[fix] NPE when task copy-in is empty due to present data on the device
@@ -174,9 +174,11 @@ public class TimeProfiler implements TornadoProfiler {
json.append(indent.toString() + "\"" + "IP" + "\"" + ": " + "\"" + RuntimeUtilities.getTornadoInstanceIP() + "\",\n");
}
json.append(indent.toString() + "\"" + ProfilerType.DEVICE + "\"" + ": " + "\"" + taskDeviceIdentifiers.get(p).get(ProfilerType.DEVICE) + "\",\n");
+ if (!taskThroughputMetrics.isEmpty()) {
for (ProfilerType p1 : taskThroughputMetrics.get(p).keySet()) {
json.append(indent.toString() + "\"" + p1 + "\"" + ": " + "\"" + taskThroughputMetrics.get(p).get(p1) + "\",\n");
}
+ }
for (ProfilerType p2 : taskTimers.get(p).keySet()) {
json.append(indent.toString() + "\"" + p2 + "\"" + ": " + "\"" + taskTimers.get(p).get(p2) + "\",\n");
}
