add buffering for csv.writer

This commit is contained in:
Youngjoon Lee 2024-08-12 11:01:59 +09:00
parent d5d94ca3e5
commit cefe352402
No known key found for this signature in database
GPG Key ID: 167546E2D1712F8C

View File

@ -42,7 +42,7 @@ class Simulation:
self.framework.spawn(self.__run_sender(sender))
# Open the output CSV file
with open(out_csv_path, "w", newline="") as f:
with open(out_csv_path, "w", newline="", buffering=8192) as f:
# Use CSV writer which is less error-prone than manually writing rows to the file
writer = csv.writer(f)
# To count how many nodes have received each message