##// END OF EJS Templates
py3: use %d in a few places...
Gregory Szorc -
r40233:113adb1b default
parent child Browse files
Show More
@@ -360,11 +360,11 b' def save_data(path):'
360 with open(path, 'w+') as file:
360 with open(path, 'w+') as file:
361 file.write("%f %f\n" % state.accumulated_time)
361 file.write("%f %f\n" % state.accumulated_time)
362 for sample in state.samples:
362 for sample in state.samples:
363 time = str(sample.time)
363 time = sample.time
364 stack = sample.stack
364 stack = sample.stack
365 sites = ['\1'.join([s.path, str(s.lineno), s.function])
365 sites = ['\1'.join([s.path, str(s.lineno), s.function])
366 for s in stack]
366 for s in stack]
367 file.write("%s\0%s\n" % (time, '\0'.join(sites)))
367 file.write("%d\0%s\n" % (time, '\0'.join(sites)))
368
368
369 def load_data(path):
369 def load_data(path):
370 lines = open(path, 'r').read().splitlines()
370 lines = open(path, 'r').read().splitlines()
@@ -566,7 +566,7 b' def display_by_method(data, fp):'
566 stattuple = (stat.selfpercent(), stat.selfseconds(),
566 stattuple = (stat.selfpercent(), stat.selfseconds(),
567 stat.site.lineno, source)
567 stat.site.lineno, source)
568
568
569 print('%33.0f%% %6.2f line %s: %s' % (stattuple), file=fp)
569 print('%33.0f%% %6.2f line %d: %s' % (stattuple), file=fp)
570
570
571 def display_about_method(data, fp, function=None, **kwargs):
571 def display_about_method(data, fp, function=None, **kwargs):
572 if function is None:
572 if function is None:
@@ -734,7 +734,7 b' def write_to_flame(data, fp, scriptpath='
734 lines[line] = 1
734 lines[line] = 1
735
735
736 for line, count in lines.iteritems():
736 for line, count in lines.iteritems():
737 file.write("%s %s\n" % (line, count))
737 file.write("%s %d\n" % (line, count))
738
738
739 file.close()
739 file.close()
740
740
General Comments 0
You need to be logged in to leave comments. Login now