Skip to content

Commit

Permalink
Tools: size_compare_branches.py: write out some.csv less racily
Browse files Browse the repository at this point in the history
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....
  • Loading branch information
peterbarker committed Mar 22, 2024
1 parent be85cb6 commit e7bf9d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/scripts/size_compare_branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,9 @@ def run_build_tasks_in_parallel(self, tasks):
for task in tasks:
task_results.append(self.gather_results_for_task(task))
# progress CSV:
with open("/tmp/some.csv", "w") as f:
f.write(self.csv_for_results(self.compare_task_results(task_results, no_elf_diff=True)))
csv_for_results = 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)
self.progress("All threads returned")
Expand Down

0 comments on commit e7bf9d2

Please sign in to comment.