Pastebin
Paste #24134: No description
< previous paste - next paste>
Pasted by Anonymous Coward
with open(data_file, 'w') as csvfile:
fields = ["Timestamp", "Use case", "Action", "Duration"]
csv_writer = csv.writer(csvfile)
csv_writer.writerow(fields)
for uc in use_cases:
# [...]
for action, duration in metrics.items():
row = [current_time, uc, action, duration]
csv_writer.writerow(row)
New Paste
Go to most recent paste.