Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
add make_time_table script
Browse files Browse the repository at this point in the history
  • Loading branch information
ist187691 committed May 18, 2021
1 parent 21cfdba commit dcf4ee7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/make_time_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from tabulate import tabulate

def read_time(path: str) -> str:
with open(path, 'r') as f:
return f.read()

trees = ["20 1000000 0", "3 5000000 0", "4 10000000 0", "3 20000000 0", "4 20000000 0"]

process_counts = ["1", "2", "4", "8", "16", "32", "64"]

table = [[tree] for tree in trees]

for line, tree in zip(table, trees):
tree_file = tree.replace(" ", "-") + ".time"
for count in process_counts:
path = f"exec_times/{count}/{tree_file}"
line.append(read_time(path))

headers = ["Arguments", *(f"{count}" for count in process_counts)]

print(tabulate(table, headers=headers, tablefmt="github"))

0 comments on commit dcf4ee7

Please sign in to comment.