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