Tools: size_compare_branches.py: write out some.csv less racily
The current construct wipes the old file before reading and collating the data and writing to the file. This meant the file was empty a lot of the time... Formulate the output then write to file....
This commit is contained in:
parent
be85cb625e
commit
e7bf9d2b57
@ -483,8 +483,9 @@ class SizeCompareBranches(object):
|
|||||||
for task in tasks:
|
for task in tasks:
|
||||||
task_results.append(self.gather_results_for_task(task))
|
task_results.append(self.gather_results_for_task(task))
|
||||||
# progress CSV:
|
# progress CSV:
|
||||||
with open("/tmp/some.csv", "w") as f:
|
csv_for_results = self.csv_for_results(self.compare_task_results(task_results, no_elf_diff=True))
|
||||||
f.write(self.csv_for_results(self.compare_task_results(task_results, no_elf_diff=True)))
|
path = pathlib.Path("/tmp/some.csv")
|
||||||
|
path.write_text(csv_for_results)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.progress("All threads returned")
|
self.progress("All threads returned")
|
||||||
|
Loading…
Reference in New Issue
Block a user