shall_break = False
while True:
current_line=[]
+ nb_empty_files=0
+ nb_files=len(files)
for file in files:
s=file.readline().replace(',',' ').split()
if not s:
+ nb_empty_files+=1
+ s="-1, 0, 0, 0'".replace(',',' ').split()
+
+ if (nb_empty_files == nb_files):
shall_break=True
break;
+
current_line.append(s);
if shall_break == True:
# We ignore the first 500msec as it doesn't seems to be part of the real benchmark
# Time < 500 usually reports BW=0 breaking the min computing
- if ((int(time)) > 500):
+ if (((int(time)) > 500) or (int(time)==-1)):
disk_perf[index].append(int(perf))
- perfs.append(perf)
+ perfs.append("%s %s"% (time, perf))
index = index + 1
# If we reach this point, it means that all the traces are coherent
for p in enumerate(perfs):
- temp_outfile[p[0]].write("%s %.2f %s\n" % (p[0], float(float(time)/1000), p[1]))
+ perf_time,perf = p[1].split()
+ if (perf_time != "-1"):
+ temp_outfile[p[0]].write("%s %.2f %s\n" % (p[0], float(float(perf_time)/1000), perf))
+
for file in files:
file.close()