This repository has been archived by the owner on May 2, 2024. It is now read-only.
forked from MVBarros/Paralel-Distributed-Computing-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ist187691
committed
May 18, 2021
1 parent
21cfdba
commit dcf4ee7
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")) |