-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
32 lines (24 loc) · 706 Bytes
/
run.py
File metadata and controls
32 lines (24 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""Modul zum joinen von Strings."""
import measure as measure
import csv
import os
def main():
"""Main function."""
header = [
"Durchläufe",
"Zeit für join_uncorrectly",
"Zeit für join_correctly",
]
os.remove("runtime.csv")
with open("runtime.csv", "w", encoding="UTF8", newline="") as f:
writer = csv.writer(f)
# write the header
writer.writerow(header)
data = [0, 0, 0]
for i in range(100):
data[0] = i * 10000
data[1] = measure.join_uncorrectly(i * 10000)
data[2] = measure.join_correctly(i * 10000)
writer.writerow(data)
if __name__ == "__main__":
main()