Auto-generated patch by python-black
[integration/test.git] / tools / odl-mdsal-clustering-tests / clustering-performance-test / create_plot_data_files.py
index 12ee2e82fae36da3b0b8d8a6ccaa0c4535408471..8ba19c144a55adecd8d70bdd4ede8c556ca95a2a 100644 (file)
@@ -8,27 +8,29 @@ text_file.close()
 rate = []
 time = []
 
-pat_rate = re.compile(r'Avg. requests/s: (?P<rate1>[0-9,\.]+) OK, (?P<rate2>[0-9,\.]+) Total')
-pat_time = re.compile(r'Stats collected in (?P<time1>[0-9,\.]+) seconds')
+pat_rate = re.compile(
+    r"Avg. requests/s: (?P<rate1>[0-9,\.]+) OK, (?P<rate2>[0-9,\.]+) Total"
+)
+pat_time = re.compile(r"Stats collected in (?P<time1>[0-9,\.]+) seconds")
 
 for line in log.splitlines():
     res = pat_rate.search(line)
     if res is not None:
-        rate.append(res.groups('rate1')[0])
-print rate
+        rate.append(res.groups("rate1")[0])
+print(rate)
 
 for line in log.splitlines():
     res = pat_time.search(line)
     if res is not None:
-        time.append(res.groups('time1')[0])
-print time
+        time.append(res.groups("time1")[0])
+print(time)
 
 text_file = open("rates.csv", "w")
-text_file.write('Add,Delete\n')
-text_file.write('{0},{1}\n'.format(rate[0], rate[1]))
+text_file.write("Add,Delete\n")
+text_file.write("{0},{1}\n".format(rate[0], rate[1]))
 text_file.close()
 
 text_file = open("times.csv", "w")
-text_file.write('Add,Delete\n')
-text_file.write('{0},{1}\n'.format(time[0], time[1]))
+text_file.write("Add,Delete\n")
+text_file.write("{0},{1}\n".format(time[0], time[1]))
 text_file.close()