##// END OF EJS Templates
statprof: fix save and load...
Boris Feld -
r38293:99188a7c default
parent child Browse files
Show More
@@ -350,7 +350,7 b' def stop():'
350 350
351 351 def save_data(path):
352 352 with open(path, 'w+') as file:
353 file.write(str(state.accumulated_time) + '\n')
353 file.write("%f %f\n" % state.accumulated_time)
354 354 for sample in state.samples:
355 355 time = str(sample.time)
356 356 stack = sample.stack
@@ -361,7 +361,7 b' def save_data(path):'
361 361 def load_data(path):
362 362 lines = open(path, 'r').read().splitlines()
363 363
364 state.accumulated_time = float(lines[0])
364 state.accumulated_time = [float(value) for value in lines[0].split()]
365 365 state.samples = []
366 366 for line in lines[1:]:
367 367 parts = line.split('\0')
General Comments 0
You need to be logged in to leave comments. Login now