Skip to content

Commit

Permalink
fix:bench
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLapous committed Oct 4, 2024
1 parent b203952 commit 34464bf
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions benchmarks/stuff.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def fill_timing(arg, f):
terminal_width = shutil.get_terminal_size().columns
left = str(args)
right = f"{timings[arg]:.4f}"
dots = terminal_width - (len(left) + len(right) + 2)
print(f"{left} {'.' * dots} {right}", end="\n")
num_dots = max(terminal_width - (len(left) + len(right) + 2), 0)
print(f"{left} {'.' * num_dots} {right}", end="\n")


for args in product(
Expand Down Expand Up @@ -112,5 +112,15 @@ def f():

pd.DataFrame(
[(*args, t) for (args), t in timings.items()],
columns=["npts", "dataset", "complex", "inv", "degree", "vine", "dtype", "timing"],
columns=[
"npts",
"dataset",
"complex",
"inv",
"degree",
"vine",
"dtype",
"column",
"timing",
],
).to_csv(f"benchmark_v{mp.__version__}.csv", index=False)

0 comments on commit 34464bf

Please sign in to comment.